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


PHP CakePlugin::unload方法代碼示例

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


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

示例1: tearDown

 /**
  * tearDown method
  *
  * @return void
  */
 public function tearDown()
 {
     parent::tearDown();
     Cache::delete('object_map', '_cake_core_');
     App::build();
     CakePlugin::unload();
 }
開發者ID:kuradakis,項目名稱:cakephp-ex,代碼行數:12,代碼來源:I18nTest.php

示例2: tearDown

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

示例3: tearDown

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

示例4: setUp

 /**
  * setUp method
  *
  * @return void
  */
 public function setUp()
 {
     parent::setUp();
     require App::pluginPath('Lil') . DS . 'Config' . DS . 'core.php';
     CakePlugin::unload('LilInvoices');
     CakePlugin::unload('LilTravelOrders');
     $this->Expense = ClassRegistry::init('LilExpenses.Expense');
 }
開發者ID:malamalca,項目名稱:lil-expenses,代碼行數:13,代碼來源:ExpenseTest.php

示例5: setUp

 /**
  * setUp
  *
  * @return void
  */
 public function setUp()
 {
     parent::setUp();
     $appDir = CakePlugin::path('Croogo') . 'Test' . DS . 'test_app' . DS;
     App::build(array('Plugin' => array($appDir . 'Plugin' . DS), 'View' => array($appDir . 'View' . DS)), App::PREPEND);
     $this->_paths = App::paths();
     CakePlugin::unload('Install');
     CakePlugin::load('Example');
     Configure::write('Acl.database', 'test');
     $this->setupSettings($appDir);
 }
開發者ID:saydulk,項目名稱:croogo,代碼行數:16,代碼來源:CroogoTestCase.php

示例6: setUp

 /**
  * setUp
  *
  * @return void
  */
 public function setUp()
 {
     parent::setUp();
     App::build(array('Plugin' => array(TESTS . 'test_app' . DS . 'Plugin' . DS), 'View' => array(TESTS . 'test_app' . DS . 'View' . DS)), App::PREPEND);
     CakePlugin::unload('Install');
     CakePlugin::load('Example');
     Configure::write('Acl.database', 'test');
     $Setting = ClassRegistry::init('Setting');
     $Setting->settingsPath = TESTS . 'test_app' . DS . 'Config' . DS . 'settings.yml';
     $Setting->writeConfiguration();
 }
開發者ID:romaing,項目名稱:croogo-rg,代碼行數:16,代碼來源:CroogoTestCase.php

示例7: tearDown

 /**
  * end a test
  *
  * @return void
  */
 public function tearDown()
 {
     parent::tearDown();
     unset($this->Helper);
     Cache::delete(AssetConfig::CACHE_BUILD_TIME_KEY, AssetConfig::CACHE_CONFIG);
     Cache::drop(AssetConfig::CACHE_CONFIG);
     // @codingStandardsIgnoreStart
     @unlink(TMP . AssetConfig::BUILD_TIME_FILE);
     // @codingStandardsIgnoreEnd
     CakePlugin::unload('TestAssetIni');
 }
開發者ID:svivanco,項目名稱:WiinikConference,代碼行數:16,代碼來源:AssetCompressHelperPluginIniTest.php

示例8: setUp

 /**
  * setUp
  *
  * @return void
  */
 public function setUp()
 {
     parent::setUp();
     App::build(array('Plugin' => array(TESTS . 'test_app' . DS . 'Plugin' . DS), 'View' => array(TESTS . 'test_app' . DS . 'View' . DS)), App::PREPEND);
     CakePlugin::unload('Install');
     CakePlugin::load('Example');
     Configure::write('Acl.database', 'test');
     $Setting = ClassRegistry::init('Settings.Setting');
     $Setting->settingsPath = TESTS . 'test_app' . DS . 'Config' . DS . 'settings.json';
     Configure::drop('settings');
     Configure::config('settings', new CroogoJsonReader(dirname($Setting->settingsPath) . DS));
     $Setting->writeConfiguration();
 }
開發者ID:laiello,項目名稱:plankonindia,代碼行數:18,代碼來源:CroogoTestCase.php

示例9: testUnload

 /**
  * Tests unloading plugins
  *
  * @return void
  */
 public function testUnload()
 {
     CakePlugin::load('TestPlugin');
     $expected = array('TestPlugin');
     $this->assertEquals($expected, CakePlugin::loaded());
     CakePlugin::unload('TestPlugin');
     $this->assertEquals(array(), CakePlugin::loaded());
     CakePlugin::load('TestPlugin');
     $expected = array('TestPlugin');
     $this->assertEquals($expected, CakePlugin::loaded());
     CakePlugin::unload('TestFakePlugin');
     $this->assertEquals($expected, CakePlugin::loaded());
 }
開發者ID:hupla78,項目名稱:Nadia,代碼行數:18,代碼來源:CakePluginTest.php

示例10: testImportingLoggers

 /**
  * test importing loggers from app/libs and plugins.
  *
  * @return void
  */
 public function testImportingLoggers()
 {
     App::build(array('Lib' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Lib' . DS), 'Plugin' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)), App::RESET);
     CakePlugin::load('TestPlugin');
     $result = CakeLog::config('libtest', array('engine' => 'TestAppLog'));
     $this->assertTrue($result);
     $this->assertEquals(CakeLog::configured(), array('libtest'));
     $result = CakeLog::config('plugintest', array('engine' => 'TestPlugin.TestPluginLog'));
     $this->assertTrue($result);
     $this->assertEquals(CakeLog::configured(), array('libtest', 'plugintest'));
     App::build();
     CakePlugin::unload();
 }
開發者ID:Juan09130424,項目名稱:CakePHP---Bootstrap-template,代碼行數:18,代碼來源:CakeLogTest.php

示例11: make

 /**
  * Compile assets for admin ui
  */
 public function make()
 {
     App::uses('AssetGenerator', 'Install.Lib');
     if (!CakePlugin::loaded('Install')) {
         CakePlugin::load('Install');
     }
     $generator = new AssetGenerator();
     try {
         $generator->generate(array('clone' => true));
     } catch (Exception $e) {
         $this->err('<error>' . $e->getMessage() . '</error>');
     }
     CakePlugin::unload('Install');
 }
開發者ID:laiello,項目名稱:plankonindia,代碼行數:17,代碼來源:CroogoShell.php

示例12: before

 /**
  * Before migration callback
  *
  * @param string $direction, up or down direction of migration process
  * @return boolean Should process continue
  * @access public
  */
 public function before($direction)
 {
     $success = true;
     if ($direction === 'up') {
         if (Configure::read('Croogo.installed')) {
             CakePlugin::load('Install');
             $dm = new DataMigration();
             $dir = CakePlugin::path('Install') . 'Config' . DS . 'Data' . DS;
             $dm->loadFile($dir . 'SettingData.php', array('extract' => sprintf('{n}[key=%s]', $this->_assetTimestamp)));
             CakePlugin::unload('Install');
         }
     } else {
         $Setting = ClassRegistry::init('Settings.Setting');
         $success = $Setting->deleteKey($this->_assetTimestamp);
     }
     return $success;
 }
開發者ID:saydulk,項目名稱:croogo,代碼行數:24,代碼來源:1390889615_added_asset_timestamp_setting.php

示例13: testConstructor

 public function testConstructor()
 {
     $plugins = CakePlugin::loaded();
     $plugins = array_filter(CakePlugin::loaded(), function ($plugin) {
         return 'Common' != $plugin && is_null(CakePlugin::unload($plugin));
     });
     $this->Model->getEventManager()->flush();
     ClassRegistry::flush();
     CakePlugin::load('TestExample');
     $Model = ClassRegistry::init('TestCommonAppModel');
     $result = $Model->actsAs;
     $expected = array('TestExample.TestExample' => null);
     $this->assertEqual($result, $expected);
     array_walk($plugins, function ($plugin) {
         CakePlugin::load($plugin);
     });
 }
開發者ID:gourmet,項目名稱:common,代碼行數:17,代碼來源:CommonAppModelTest.php

示例14: before

 /**
  * Before migration callback
  *
  * @param string $direction, up or down direction of migration process
  * @return boolean Should process continue
  * @access public
  */
 public function before($direction)
 {
     $success = true;
     if ($direction === 'up') {
         if (Configure::read('Croogo.installed')) {
             $settingsToUpdate = array('Site.locale', 'Site.admin_theme', 'Site.home_url');
             CakePlugin::load('Install');
             $dm = new DataMigration();
             $dir = CakePlugin::path('Install') . 'Config' . DS . 'Data' . DS;
             foreach ($settingsToUpdate as $key) {
                 $dm->loadFile($dir . 'SettingData.php', array('extract' => sprintf('{n}[key=%s]', $key)));
             }
             CakePlugin::unload('Install');
         }
     }
     return $success;
 }
開發者ID:saydulk,項目名稱:croogo,代碼行數:24,代碼來源:1392779470_setting_updates.php

示例15: setUp

 /**
  * setUp
  *
  * @return void
  */
 public function setUp()
 {
     parent::setUp();
     App::build(array('Plugin' => array(TESTS . 'test_app' . DS . 'Plugin' . DS), 'View' => array(TESTS . 'test_app' . DS . 'View' . DS)), App::PREPEND);
     if (!isset($_SERVER['REMOTE_ADDR'])) {
         $_SERVER['REMOTE_ADDR'] = '127.0.0.1';
     }
     CakePlugin::unload('Install');
     CakePlugin::load(array('Users'), array('bootstrap' => true));
     CakePlugin::load('Example');
     Configure::write('Acl.database', 'test');
     $Setting = ClassRegistry::init('Settings.Setting');
     $Setting->settingsPath = TESTS . 'test_app' . DS . 'Config' . DS . 'settings.json';
     Configure::drop('settings');
     Configure::config('settings', new CroogoJsonReader(dirname($Setting->settingsPath) . DS));
     CakeLog::drop('stdout');
     CakeLog::drop('stderr');
     $Setting->writeConfiguration();
 }
開發者ID:laiello,項目名稱:plankonindia,代碼行數:24,代碼來源:CroogoControllerTestCase.php


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