# OneToManyLinked.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 OneToManyLinked extends UnifiedContainer
    00016     {
    00017         public function __construct(
    00018             Identifiable $parent, GenericDAO $dao, $lazy = true
    00019         )
    00020         {
    00021             parent::__construct($parent, $dao, $lazy);
    00022
    00023             $worker =
    00024                 $lazy
    00025                     ? 'OneToManyLinkedLazy'
    00026                     : 'OneToManyLinkedFull';
    00027
    00028             $this->worker = new $worker($this);
    00029         }
    00030
    00031         public function getChildIdField()
    00032         {
    00033             return 'id';
    00034         }
    00035
    00036         public function isUnlinkable()
    00037         {
    00038             return false;
    00039         }
    00040
    00041         public function getHelperTable()
    00042         {
    00043             return $this->dao->getTable();
    00044         }
    00045     }
    00046 ?>