ManyToManyLinked.class.php

Go to the documentation of this file.
00001 <?php
00002 /***************************************************************************
00003  *   Copyright (C) 2005-2007 by Konstantin V. Arkhipov                     *
00004  *                                                                         *
00005  *   This program is free software; you can redistribute it and/or modify  *
00006  *   it under the terms of the GNU Lesser General Public License as        *
00007  *   published by the Free Software Foundation; either version 3 of the    *
00008  *   License, or (at your option) any later version.                       *
00009  *                                                                         *
00010  ***************************************************************************/
00011 
00015     abstract class ManyToManyLinked extends UnifiedContainer
00016     {
00017         abstract public function getHelperTable();
00018         
00019         public function getParentTableIdField()
00020         {
00021             return 'id';
00022         }
00023         
00024         public function __construct(
00025             Identifiable $parent, GenericDAO $dao, $lazy = true
00026         )
00027         {
00028             parent::__construct($parent, $dao, $lazy);
00029             
00030             $worker =
00031                 $lazy
00032                     ? 'ManyToManyLinkedLazy'
00033                     : 'ManyToManyLinkedFull';
00034             
00035             $this->worker = new $worker($this);
00036         }
00037     }
00038 ?>