本文整理汇总了PHP中Cake\Core\Plugin::unload方法的典型用法代码示例。如果您正苦于以下问题:PHP Plugin::unload方法的具体用法?PHP Plugin::unload怎么用?PHP Plugin::unload使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Cake\Core\Plugin
的用法示例。
在下文中一共展示了Plugin::unload方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: tearDown
/**
* tearDown method
*
* @return void
*/
public function tearDown()
{
parent::tearDown();
Plugin::unload('TestPlugin');
Plugin::unload('TestTheme');
unset($this->View);
}
示例2: tearDown
/**
* tearDown method
*
* @return void
*/
public function tearDown()
{
parent::tearDown();
Plugin::unload();
ConnectionManager::drop('test_variant');
ConnectionManager::dropAlias('other_name');
}
示例3: tearDown
/**
* tearDown
*
* @return void
*/
public function tearDown()
{
parent::tearDown();
unset($this->Shell);
Configure::write('App.namespace', 'App');
Plugin::unload();
}
示例4: _getAssetFile
/**
* Builds asset file path based off url
*
* @param string $url Asset URL
* @return string Absolute path for asset file
*/
protected function _getAssetFile($url)
{
//Brood unload hack cause vendor plugin loaded for some reason
Plugin::unload('Garderobe');
$parts = explode('/', $url);
$fileType = array_shift($parts);
$fileFragment = implode(DS, $parts);
$allowedExtensions = ComponentInstallerConfigureTrait::getSupportedExtensions();
$registeredComponents = (require ROOT . DS . 'vendor' . DS . 'cakephp-components.php');
foreach ($registeredComponents as $component) {
$extensions = implode('|', $allowedExtensions);
if (preg_match("/({$extensions})\$/i", $fileFragment)) {
foreach ($component as $type => $chunk) {
if ($fileType != $type) {
continue;
}
$path = ROOT . DS . Configure::read('App.webroot') . DS . $chunk . DS;
if (Configure::read('debug') == false && !strpos($fileFragment, 'min')) {
$fileFragment = preg_replace("/(css|js)\$/i", "min.\$1", $fileFragment);
}
if (file_exists($path . $fileFragment)) {
return $path . $fileFragment;
}
}
}
}
}
示例5: tearDown
/**
* Tear down method.
*
* @return void
*/
public function tearDown()
{
parent::tearDown();
Plugin::unload('Union/Core');
Plugin::unload('TestPlugin');
unset($this->Controller, $this->App);
}
示例6: tearDown
/**
* tearDown method
*
* @return void
*/
public function tearDown()
{
parent::tearDown();
Configure::delete('Asset');
Plugin::unload();
unset($this->Helper, $this->View);
}
示例7: tearDown
/**
* tearDown
*
* @return void
*/
public function tearDown()
{
parent::tearDown();
Plugin::unload();
DispatcherFactory::clear();
$this->Case->controller = null;
}
示例8: tearDown
/**
* tearDown method
*
* @return void
*/
public function tearDown()
{
$_SESSION = array();
unset($this->View, $this->Session);
Plugin::unload();
parent::tearDown();
}
示例9: tearDown
/**
* tearDown method
*
* @return void
*/
public function tearDown()
{
unset($this->Task);
TableRegistry::clear();
parent::tearDown();
Plugin::unload('ControllerTest');
}
示例10: tearDown
/**
* Tear down method.
*
* @return void
*/
public function tearDown()
{
parent::tearDown();
Plugin::unload('Union/Core');
Plugin::unload('TestPlugin');
unset($this->ToolBar, $this->View);
}
示例11: tearDown
/**
* tearDown method
*
* @return void
*/
public function tearDown()
{
parent::tearDown();
unset($this->shell);
Plugin::unload();
$bootstrap = new File($this->bootstrap, false);
$bootstrap->write($this->originalBootstrapContent);
}
示例12: tearDown
/**
* tearDown method
*
* @return void
*/
public function tearDown()
{
parent::tearDown();
unset($this->Task);
$Folder = new Folder($this->path);
$Folder->delete();
Plugin::unload();
}
示例13: tearDown
/**
* Tear down method
*
* @return void
*/
public function tearDown()
{
parent::tearDown();
I18n::clear();
I18n::defaultFormatter('default');
I18n::locale($this->locale);
Plugin::unload();
Cache::clear(false, '_cake_core_');
}
示例14: tearDown
public function tearDown()
{
parent::tearDown();
Plugin::unload('ThemeInstallerTest');
$testPluginFolder = new Folder(ROOT . DS . 'plugins' . DS . 'ThemeInstallerTest');
$testPluginFolder->delete();
$testPluginConfigFolder = new Folder(ROOT . DS . 'config' . DS . 'Plugins' . DS . 'ThemeInstallerTest');
$testPluginConfigFolder->delete();
$webrootThemeFolder = new Folder(WWW_ROOT . 'theme' . DS . 'ThemeInstallerTest');
$webrootThemeFolder->delete();
}
示例15: testLoadPluginTask
/**
* test loading a plugin helper.
*
* @return void
*/
public function testLoadPluginTask()
{
$dispatcher = $this->getMockBuilder('Cake\\Console\\ShellDispatcher')->disableOriginalConstructor()->getMock();
$shell = $this->getMockBuilder('Cake\\Console\\Shell')->disableOriginalConstructor()->getMock();
Plugin::load('TestPlugin');
$this->Tasks = new TaskRegistry($shell, $dispatcher);
$result = $this->Tasks->load('TestPlugin.OtherTask');
$this->assertInstanceOf('TestPlugin\\Shell\\Task\\OtherTaskTask', $result, 'Task class is wrong.');
$this->assertInstanceOf('TestPlugin\\Shell\\Task\\OtherTaskTask', $this->Tasks->OtherTask, 'Class is wrong');
Plugin::unload();
}