Inheritance: implements Zend\ModuleManager\Feature\BootstrapListenerInterface, implements Zend\ModuleManager\Feature\ConfigProviderInterface, implements Zend\ModuleManager\Feature\AutoloaderProviderInterface
コード例 #1
0
ファイル: CommentTest.php プロジェクト: gotcms/gotcms
 /**
  * Tears down the fixture, for example, closes a network connection.
  * This method is called after a test is executed.
  *
  * @return void
  */
 protected function tearDown()
 {
     $this->boostrap->uninstall();
     $this->document->delete();
     $this->view->delete();
     $this->layout->delete();
     $this->documentType->delete();
     $this->user->delete();
     unset($this->document);
     unset($this->object);
     unset($this->view);
     unset($this->layout);
     unset($this->documentType);
     unset($this->user);
 }
コード例 #2
0
ファイル: post.php プロジェクト: vano00/blog
 public static function _init()
 {
     if (in_array('post', \Config::get('comment')) and \Module::load('comment')) {
         static::$_has_many = array_merge(static::$_has_many, ['comments' => ['model_to' => '\\Comment\\Model_Comment', 'key_from' => 'id', 'key_to' => 'post_id', 'cascade_save' => true, 'cascade_delete' => true], 'published_comments' => ['model_to' => '\\Comment\\Model_Comment', 'conditions' => array('where' => array(array('status', '=', 'published')))]]);
     }
 }