/** * Sets a list of dependencies. * A dependency list contains an entry for each dependent bean. * A dependent bean will be removed if the relation with one of the * dependencies gets broken. * * Example: * * array( * 'page' => array('book','magazine') * ) * * A page will be removed if: * * unset($book->ownPage[$pageID]); * * or: * * unset($magazine->ownPage[$pageID]); * * but not if: * * unset($paper->ownPage[$pageID]); * * * @param array $dep list of dependencies */ public static function dependencies($dep) { self::$redbean->setDepList($dep); }
/** * Sets a list of dependencies. * A dependency list contains an entry for each dependent bean. * A dependent bean will be removed if the relation with one of the * dependencies gets broken. * * Example: * * array( * 'page' => array('book', 'magazine') * ) * * A page will be removed if: * * unset($book->ownPage[$pageID]); * * or: * * unset($magazine->ownPage[$pageID]); * * but not if: * * unset($paper->ownPage[$pageID]); * * @param array $dep list of dependencies * * @return void */ public function dependencies($dep) { $this->redbean->setDepList($dep); }