当前位置: 首页>>代码示例>>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;未经允许,请勿转载。