protected function addRefFKMethods(&$script)
    {
        if (!$referrers = $this->getTable()->getReferrers()) {
            return;
        }
        $this->addInitRelations($script, $referrers);
        foreach ($referrers as $refFK) {
            $this->declareClassFromBuilder($this->getNewStubObjectBuilder($refFK->getTable()), 'Child');
            $this->declareClassFromBuilder($this->getNewStubQueryBuilder($refFK->getTable()));
            if ($refFK->isLocalPrimaryKey()) {
                $this->addPKRefFKGet($script, $refFK);
                $this->addPKRefFKSet($script, $refFK);
            } else {
                $this->addRefFKClear($script, $refFK);
                $this->addRefFKPartial($script, $refFK);
                $this->addRefFKInit($script, $refFK);
                $this->addRefFKGet($script, $refFK);
                $this->addRefFKSet($script, $refFK);
                $this->addRefFKCount($script, $refFK);
                $this->addRefFKAdd($script, $refFK);
                $this->addRefFKDoAdd($script, $refFK);
                $this->addRefFKRemove($script, $refFK);
                $this->addRefFKGetJoinMethods($script, $refFK);
            }
        }
    }
protected function addRefFKMethods(&$script)
    {
        if (!$referrers = $this->getTable()->getReferrers()) {
            return;
        }
        $this->addInitRelations($script, $referrers);
        foreach ($referrers as $refFK) {
            $this->declareClassFromBuilder($this->getNewStubObjectBuilder($refFK->getTable()), 'Child');
            $this->declareClassFromBuilder($this->getNewStubQueryBuilder($refFK->getTable()));
            if ($refFK->isLocalPrimaryKey()) {
                $this->addPKRefFKGet($script, $refFK);
                $this->addPKRefFKSet($script, $refFK);
            } else {
                $this->addRefFKClear($script, $refFK);
                $this->addRefFKPartial($script, $refFK);
                $this->addRefFKInit($script, $refFK);
                $this->addRefFKGet($script, $refFK);
                $this->addRefFKSet($script, $refFK);
                $this->addRefFKCount($script, $refFK);
                $this->addRefFKAdd($script, $refFK);
                $this->addRefFKDoAdd($script, $refFK);
                $this->addRefFKRemove($script, $refFK);
                $this->addRefFKGetJoinMethods($script, $refFK);
            }
        }
    }
protected function addRefFKMethods ( & $ script ) { if ( ! $ referrers = $ this -> getTable ( ) -> getReferrers ( ) ) { return ; } $ this -> addInitRelations ( $ script , $ referrers ) ; foreach ( $ referrers as $ refFK ) { $ this -> declareClassFromBuilder ( $ this -> getNewStubObjectBuilder ( $ refFK -> getTable ( ) ) , 'Child' ) ; $ this -> declareClassFromBuilder ( $ this -> getNewStubQueryBuilder ( $ refFK -> getTable ( ) ) ) ; if ( $ refFK -> isLocalPrimaryKey ( ) ) { $ this -> addPKRefFKGet ( $ script , $ refFK ) ; $ this -> addPKRefFKSet ( $ script , $ refFK ) ; } else { $ this -> addRefFKClear ( $ script , $ refFK ) ; $ this -> addRefFKPartial ( $ script , $ refFK ) ; $ this -> addRefFKInit ( $ script , $ refFK ) ; $ this -> addRefFKGet ( $ script , $ refFK ) ; $ this -> addRefFKSet ( $ script , $ refFK ) ; $ this -> addRefFKCount ( $ script , $ refFK ) ; $ this -> addRefFKAdd ( $ script , $ refFK ) ; $ this -> addRefFKDoAdd ( $ script , $ refFK ) ; $ this -> addRefFKRemove ( $ script , $ refFK ) ; $ this -> addRefFKGetJoinMethods ( $ script , $ refFK ) ; } } }
Adds the methods for retrieving, initializing, adding objects that are related to this one by foreign keys.
@param string &$script The script will be modified in this method.
Adds the methods for retrieving initializing adding objects that are related to this one by foreign keys .