本文整理汇总了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);
}
}
示例2: tearDown
/**
* tearDown method
*
* @return void
*/
public function tearDown()
{
unset($this->NotificationQueue);
unset($this->NotificationContents);
TableRegistry::clear();
parent::tearDown();
}
示例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();
}
示例4: tearDown
/**
* tear down
* @return void
*/
public function tearDown()
{
parent::tearDown();
$this->Noticias->removeBehavior("CakePtbr.AjusteData");
unset($this->Noticias, $this->Noticias);
TableRegistry::clear();
}
示例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();
}
示例6: tearDown
public function tearDown()
{
TableRegistry::clear();
Type::clear();
Type::map($this->_map);
parent::tearDown();
}
示例7: tearDown
/**
* endTest
*
* @return void
*/
public function tearDown()
{
parent::tearDown();
unset($this->Articles);
unset($this->Posts);
TableRegistry::clear();
}
示例8: tearDown
/**
* tearDown method
*
* @return void
*/
public function tearDown()
{
unset($this->Task);
TableRegistry::clear();
parent::tearDown();
Plugin::unload('ControllerTest');
}
示例9: tearDown
/**
* endTest
*
* @return void
*/
public function tearDown()
{
parent::tearDown();
unset($this->FileStorage);
unset($this->FileStorageBehavior);
TableRegistry::clear();
}
示例10: tearDown
/**
* End a test
*
* @return void
*/
public function tearDown()
{
parent::tearDown();
unset($this->Article);
TableRegistry::clear();
DebugTimer::clear();
}
示例11: tearDown
/**
* tearDown method
*
* @return void
*/
public function tearDown()
{
unset($this->Posts);
unset($this->Behavior);
ResolvableAuthorizationInstance::reset();
TableRegistry::clear();
parent::tearDown();
}
示例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');
}
示例13: tearDown
/**
* tearDown method
*
* @return void
*/
public function tearDown()
{
unset($this->SeoBehavior);
unset($this->Articles);
unset($this->router);
parent::tearDown();
TableRegistry::clear();
}
示例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();
}
示例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');
}