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


PHP Plugin::unload方法代碼示例

本文整理匯總了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);
 }
開發者ID:KarimaLadhani,項目名稱:cakephp,代碼行數:12,代碼來源:CellTest.php

示例2: tearDown

 /**
  * tearDown method
  *
  * @return void
  */
 public function tearDown()
 {
     parent::tearDown();
     Plugin::unload();
     ConnectionManager::drop('test_variant');
     ConnectionManager::dropAlias('other_name');
 }
開發者ID:maitrepylos,項目名稱:nazeweb,代碼行數:12,代碼來源:ConnectionManagerTest.php

示例3: tearDown

 /**
  * tearDown
  *
  * @return void
  */
 public function tearDown()
 {
     parent::tearDown();
     unset($this->Shell);
     Configure::write('App.namespace', 'App');
     Plugin::unload();
 }
開發者ID:rashmi,項目名稱:newrepo,代碼行數:12,代碼來源:CompletionShellTest.php

示例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;
                 }
             }
         }
     }
 }
開發者ID:mindforce,項目名稱:cakephp-garderobe,代碼行數:33,代碼來源:AssetFilter.php

示例5: tearDown

 /**
  * Tear down method.
  *
  * @return void
  */
 public function tearDown()
 {
     parent::tearDown();
     Plugin::unload('Union/Core');
     Plugin::unload('TestPlugin');
     unset($this->Controller, $this->App);
 }
開發者ID:UnionCMS,項目名稱:Core,代碼行數:12,代碼來源:ProcessComponentTest.php

示例6: tearDown

 /**
  * tearDown method
  *
  * @return void
  */
 public function tearDown()
 {
     parent::tearDown();
     Configure::delete('Asset');
     Plugin::unload();
     unset($this->Helper, $this->View);
 }
開發者ID:Slayug,項目名稱:castor,代碼行數:12,代碼來源:HelperTest.php

示例7: tearDown

 /**
  * tearDown
  *
  * @return void
  */
 public function tearDown()
 {
     parent::tearDown();
     Plugin::unload();
     DispatcherFactory::clear();
     $this->Case->controller = null;
 }
開發者ID:maitrepylos,項目名稱:nazeweb,代碼行數:12,代碼來源:ControllerTestCaseTest.php

示例8: tearDown

 /**
  * tearDown method
  *
  * @return void
  */
 public function tearDown()
 {
     $_SESSION = array();
     unset($this->View, $this->Session);
     Plugin::unload();
     parent::tearDown();
 }
開發者ID:maitrepylos,項目名稱:nazeweb,代碼行數:12,代碼來源:SessionHelperTest.php

示例9: tearDown

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

示例10: tearDown

 /**
  * Tear down method.
  *
  * @return void
  */
 public function tearDown()
 {
     parent::tearDown();
     Plugin::unload('Union/Core');
     Plugin::unload('TestPlugin');
     unset($this->ToolBar, $this->View);
 }
開發者ID:UnionCMS,項目名稱:Core,代碼行數:12,代碼來源:ToolBarHelperTest.php

示例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);
 }
開發者ID:JesseDarellMoore,項目名稱:CS499,代碼行數:13,代碼來源:UnloadTaskTest.php

示例12: tearDown

 /**
  * tearDown method
  *
  * @return void
  */
 public function tearDown()
 {
     parent::tearDown();
     unset($this->Task);
     $Folder = new Folder($this->path);
     $Folder->delete();
     Plugin::unload();
 }
開發者ID:alexunique0519,項目名稱:Blog_Cakephp_association,代碼行數:13,代碼來源:ExtractTaskTest.php

示例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_');
 }
開發者ID:KarimaLadhani,項目名稱:cakephp,代碼行數:14,代碼來源:I18nTest.php

示例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();
 }
開發者ID:mswagencia,項目名稱:msw-appcore,代碼行數:11,代碼來源:ThemeInstallerTest.php

示例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();
 }
開發者ID:rashmi,項目名稱:newrepo,代碼行數:16,代碼來源:TaskRegistryTest.php


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