_conf = $conf; } /** * Get a paste, optionally a specific instance. * * @param string $pasteId * @return model_paste */ public function getPaste($pasteId = null) { $paste = new model_paste($this->_conf, $this->_getStore()); if ($pasteId !== null) $paste->setId($pasteId); return $paste; } /** * Gets, and creates if neccessary, a store object */ private function _getStore() { if ($this->_store === null) { $this->_store = forward_static_call( array($this->_conf->getKey('class', 'model'), 'getInstance'), $this->_conf->getSection('model_options') ); } return $this->_store; } }