예제 #1
0
파일: Model.php 프로젝트: cheevauva/trash
 /**
  * @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);
 }
예제 #2
0
 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'));
 }
예제 #3
0
파일: Model.php 프로젝트: cheevauva/trash
 public function add($bind)
 {
     $bind['date'] = date('Y-m-d');
     return parent::add($bind);
 }