/** * @param array $bind [ webpage => [], page => [] ] * @return type */ public function add($bind) { if ($this->getByAlias($bind['alias'])) { throw new Exception('Page with this alias is exists', 1); } return parent::add($bind); }
public function setup($basePath) { $this->getRegistry()->setCommonPath($basePath); $this->getConfig()->setRegistry($this->getRegistry()); $this->getConfig()->setLoaderEnvironments('.yml', array(new \Spyc(), 'loadFile')); $this->includeDependencyInjection(); $this->includeDecorators(); $this->getApplication()->module('Database_Model')->setDatabaseAdapter(new \Zend_Db()); \A1\Module\Model::setLoaderConnections(array($this->getApplication()->module('Database_Model'), 'getConnection')); }
public function add($bind) { $bind['date'] = date('Y-m-d'); return parent::add($bind); }