當前位置: 首頁>>代碼示例>>PHP>>正文


PHP TableRegistry::clear方法代碼示例

本文整理匯總了PHP中Cake\ORM\TableRegistry::clear方法的典型用法代碼示例。如果您正苦於以下問題:PHP TableRegistry::clear方法的具體用法?PHP TableRegistry::clear怎麽用?PHP TableRegistry::clear使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Cake\ORM\TableRegistry的用法示例。


在下文中一共展示了TableRegistry::clear方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: all

 /**
  * Bake All the controllers at once. Will only bake controllers for models that exist.
  *
  * @return void
  */
 public function all()
 {
     foreach ($this->listAll() as $table) {
         TableRegistry::clear();
         $this->main($table);
     }
 }
開發者ID:maitrepylos,項目名稱:nazeweb,代碼行數:12,代碼來源:ControllerTask.php

示例2: tearDown

 /**
  * tearDown method
  *
  * @return void
  */
 public function tearDown()
 {
     unset($this->NotificationQueue);
     unset($this->NotificationContents);
     TableRegistry::clear();
     parent::tearDown();
 }
開發者ID:codekanzlei,項目名稱:cake-notifications,代碼行數:12,代碼來源:NotificationQueuesTableTest.php

示例3: setUp

 /**
  * setUp method
  *
  * @return void
  */
 public function setUp()
 {
     $this->Articles = TableRegistry::get('ArticlesTable', ['className' => 'ModelHistoryTestApp\\Model\\Table\\ArticlesTable']);
     $this->ModelHistory = TableRegistry::get('ModelHistory', ['className' => 'ModelHistory\\Model\\Table\\ModelHistoryTable']);
     parent::setUp();
     TableRegistry::clear();
 }
開發者ID:codekanzlei,項目名稱:cake-model-history,代碼行數:12,代碼來源:HistorizableBehaviorTest.php

示例4: tearDown

 /**
  * tear down
  * @return void
  */
 public function tearDown()
 {
     parent::tearDown();
     $this->Noticias->removeBehavior("CakePtbr.AjusteData");
     unset($this->Noticias, $this->Noticias);
     TableRegistry::clear();
 }
開發者ID:matheusviegas,項目名稱:cake_ptbr,代碼行數:11,代碼來源:AjusteDataBehaviorTest.php

示例5: setUp

 /**
  * reset environment.
  *
  * @return void
  */
 public function setUp()
 {
     parent::setUp();
     Configure::write('App.namespace', 'TestApp');
     Plugin::load(array('TestPlugin', 'TestPluginTwo'));
     $this->Case = $this->getMockForAbstractClass('Cake\\TestSuite\\ControllerTestCase');
     $this->Case->loadRoutes = false;
     DispatcherFactory::add('Routing');
     DispatcherFactory::add('ControllerFactory');
     Router::scope('/', function ($routes) {
         $routes->fallbacks();
     });
     Router::prefix('admin', function ($routes) {
         $routes->plugin('TestPlugin', function ($routes) {
             $routes->fallbacks();
         });
         $routes->fallbacks();
     });
     Router::plugin('TestPlugin', function ($routes) {
         $routes->fallbacks();
     });
     Router::plugin('TestPluginTwo', function ($routes) {
         $routes->fallbacks();
     });
     TableRegistry::clear();
 }
開發者ID:maitrepylos,項目名稱:nazeweb,代碼行數:31,代碼來源:ControllerTestCaseTest.php

示例6: tearDown

 public function tearDown()
 {
     TableRegistry::clear();
     Type::clear();
     Type::map($this->_map);
     parent::tearDown();
 }
開發者ID:Slayug,項目名稱:castor,代碼行數:7,代碼來源:TableTest.php

示例7: tearDown

 /**
  * endTest
  *
  * @return void
  */
 public function tearDown()
 {
     parent::tearDown();
     unset($this->Articles);
     unset($this->Posts);
     TableRegistry::clear();
 }
開發者ID:ayman-alkom,項目名稱:cakephp-ratings,代碼行數:12,代碼來源:RatableBehaviorTest.php

示例8: tearDown

 /**
  * tearDown method
  *
  * @return void
  */
 public function tearDown()
 {
     unset($this->Task);
     TableRegistry::clear();
     parent::tearDown();
     Plugin::unload('ControllerTest');
 }
開發者ID:ringiait,項目名稱:portal,代碼行數:12,代碼來源:ControllerTaskTest.php

示例9: tearDown

 /**
  * endTest
  *
  * @return void
  */
 public function tearDown()
 {
     parent::tearDown();
     unset($this->FileStorage);
     unset($this->FileStorageBehavior);
     TableRegistry::clear();
 }
開發者ID:tiagocapelli,項目名稱:cakephp-file-storage,代碼行數:12,代碼來源:FileStorageTableTest.php

示例10: tearDown

 /**
  * End a test
  *
  * @return void
  */
 public function tearDown()
 {
     parent::tearDown();
     unset($this->Article);
     TableRegistry::clear();
     DebugTimer::clear();
 }
開發者ID:neilan35,項目名稱:betterwindow1,代碼行數:12,代碼來源:TimedBehaviorTest.php

示例11: tearDown

 /**
  * tearDown method
  *
  * @return void
  */
 public function tearDown()
 {
     unset($this->Posts);
     unset($this->Behavior);
     ResolvableAuthorizationInstance::reset();
     TableRegistry::clear();
     parent::tearDown();
 }
開發者ID:pulse14,項目名稱:cakephp-resolveauth,代碼行數:13,代碼來源:FieldAuthorizationBehaviorTest.php

示例12: tearDown

 /**
  * tearDown
  *
  * @return void
  */
 public function tearDown()
 {
     parent::tearDown();
     unset($this->Model);
     TableRegistry::clear();
     $folder = new Folder(WWW_ROOT . 'upload');
     $folder->delete(WWW_ROOT . 'upload');
 }
開發者ID:arourke,項目名稱:Cake3-Upload,代碼行數:13,代碼來源:UploadBehaviorTest.php

示例13: tearDown

 /**
  * tearDown method
  *
  * @return void
  */
 public function tearDown()
 {
     unset($this->SeoBehavior);
     unset($this->Articles);
     unset($this->router);
     parent::tearDown();
     TableRegistry::clear();
 }
開發者ID:orgasmicnightmare,項目名稱:cakephp-seo,代碼行數:13,代碼來源:SeoBehaviorTest.php

示例14: setUp

 /**
  * setup
  *
  * @return void
  */
 public function setUp()
 {
     parent::setUp();
     TableRegistry::clear();
     $this->Users = TableRegistry::get('Users', ['className' => 'TestApp\\Model\\Table\\UsersTable']);
     $this->UserBehavior = $this->getMockBuilder('\\Burzum\\UserTools\\Model\\Behavior\\UserBehavior')->setConstructorArgs([$this->Users])->setMethods(['getMailer'])->getMock();
     $this->MockMailer = $this->getMockBuilder('Burzum\\UserTools\\Mailer\\UsersMailer')->setMethods(['send'])->getMock();
 }
開發者ID:burzum,項目名稱:cakephp-user-tools,代碼行數:13,代碼來源:UserBehaviorTest.php

示例15: setUp

 /**
  * setup
  *
  * @return void
  */
 public function setUp()
 {
     parent::setUp();
     $this->Collection = $this->getMock('Cake\\Controller\\ComponentRegistry');
     $this->auth = new OAuthAuthenticate($this->Collection, ['userModel' => 'Users']);
     TableRegistry::clear();
     $this->response = $this->getMock('Cake\\Network\\Response');
 }
開發者ID:surjit,項目名稱:oauth-server,代碼行數:13,代碼來源:OAuthAuthenticateTest.php


注:本文中的Cake\ORM\TableRegistry::clear方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。