/** * Set the bridge class for the specific identifier * * @param string $identifier * @param string $bridge Class name for a \MUtil_Model_Bridge_BridgeInterface, optioanlly loaded using *_Model_Bridge_* * @return \MUtil_Model_ModelAbstract (continuation pattern) */ public function setBridgeFor($identifier, $bridge) { if (!is_string($bridge)) { throw new \MUtil_Model_ModelException("Non string bridge class specified for {$identifier}."); } $bridges = $this->getMeta(\MUtil_Model::META_BRIDGES); if (!$bridges) { $bridges = \MUtil_Model::getDefaultBridges(); } $bridges[$identifier] = $bridge; $this->setMeta(\MUtil_Model::META_BRIDGES, $bridges); }