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


PHP Cache::disable方法代碼示例

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


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

示例1: __construct

 /**
  * Constructs this Shell instance.
  *
  * @param \Cake\Console\ConsoleIo $io An io instance.
  */
 public function __construct(ConsoleIo $io = null)
 {
     Cache::disable();
     parent::__construct($io);
 }
開發者ID:scherersoftware,項目名稱:cakephp-schema,代碼行數:10,代碼來源:SchemaShell.php

示例2: testCacheDisabled

 /**
  * testCacheDisabled method
  *
  * @return void
  */
 public function testCacheDisabled()
 {
     Cache::disable();
     $result = $this->_testEnabled();
     $this->assertEquals(false, $result);
     Cache::enable();
 }
開發者ID:chnvcode,項目名稱:cakephp-viewmemcached,代碼行數:12,代碼來源:ViewMemcachedHelperTest.php

示例3: startup

 /**
  * Assign $this->connection to the active task if a connection param is set.
  *
  * @return void
  */
 public function startup()
 {
     parent::startup();
     Configure::write('debug', true);
     Cache::disable();
     if (isset($this->params['connection'])) {
         $this->connection = $this->params['connection'];
     }
 }
開發者ID:mindforce,項目名稱:cakephp-platform,代碼行數:14,代碼來源:SetupShell.php

示例4: setUp

 /**
  * setUp method
  *
  * @return void
  */
 public function setUp()
 {
     parent::setUp();
     Cache::disable();
     $this->request = $this->getMock('Cake\\Network\\Request');
     $this->response = $this->getMock('Cake\\Network\\Response');
     $this->Seobox = new SeoboxCell($this->request, $this->response);
     $this->Seobox->viewBuilder()->className('View');
     $this->Seobox->viewBuilder()->layout('default');
     $this->View = $this->Seobox->createView();
 }
開發者ID:orgasmicnightmare,項目名稱:cakephp-seo,代碼行數:16,代碼來源:SeoboxCellTest.php

示例5: setUp

 /**
  * setUp method
  *
  * @return void
  */
 public function setUp()
 {
     parent::setUp();
     Cache::disable();
     $request = new request();
     $response = new response();
     $this->Controller = new SeoComponentTestController(new Request('/articles/view?slug=test-title-one'));
     $this->Controller->viewBuilder()->className('View');
     $this->Controller->viewBuilder()->layout('default');
     $this->Controller->startupProcess();
     $this->View = $this->Controller->createView();
 }
開發者ID:orgasmicnightmare,項目名稱:cakephp-seo,代碼行數:17,代碼來源:SeoComponentTest.php

示例6: startup

 /**
  * Assign $this->connection to the active task if a connection param is set.
  *
  * @return void
  */
 public function startup()
 {
     parent::startup();
     Cache::disable();
     $this->UserTable = TableRegistry::get($this->param('model'), ['connection' => ConnectionManager::get($this->param('connection'))]);
     if (!$this->UserTable->hasBehavior('Burzum/UserTools.User')) {
         $this->UserTable->addBehavior('Burzum/UserTools.User');
     }
     try {
         $this->UserTable->schema();
     } catch (\Exception $e) {
         $this->err($e->getMessage());
         $this->_stop(1);
     }
 }
開發者ID:tiagocapelli,項目名稱:cakephp-user-tools,代碼行數:20,代碼來源:UserShell.php

示例7: startup

 /**
  * Assign $this->connection to the active task if a connection param is set.
  *
  * @return void
  */
 public function startup()
 {
     parent::startup();
     Configure::write('debug', true);
     Cache::disable();
     $task = $this->_camelize($this->command);
     if (isset($this->{$task}) && !in_array($task, ['Project'])) {
         if (isset($this->params['connection'])) {
             $this->{$task}->connection = $this->params['connection'];
         }
     }
     if (isset($this->params['connection'])) {
         $this->connection = $this->params['connection'];
     }
 }
開發者ID:maitrepylos,項目名稱:nazeweb,代碼行數:20,代碼來源:BakeShell.php

示例8: setUpBeforeClass

 public static function setUpBeforeClass()
 {
     parent::setUpBeforeClass();
     //データベース接続設定
     $connectionInfo = self::$_connectionInfo;
     //cacheの設定はしていないためcacheを無効にする
     Cache::disable();
     //defaultは使わないがいないとエラーになるのでテストと同じものを設定する
     Configure::write('Datasources.default', $connectionInfo);
     Configure::write('Datasources.test', $connectionInfo);
     ConnectionManager::config(Configure::consume('Datasources'));
     //APPが定義されていないとエラーになるため。(逆に何か設定してあればとりあえず動くみたい?)
     if (!defined('APP')) {
         define('APP', self::$_appInfo);
     }
 }
開發者ID:satthi,項目名稱:plugin-test-support,代碼行數:16,代碼來源:AppTestCase.php

示例9: startup

 /**
  * Assign $this->connection to the active task if a connection param is set.
  *
  * @return void
  */
 public function startup()
 {
     $this->Sbc = new Sbc();
     $this->Sbc->loadConfig();
     parent::startup();
     Configure::write('debug', true);
     Cache::disable();
     $task = $this->_camelize($this->command);
     if (isset($this->{$task})) {
         if (isset($this->params['connection'])) {
             $this->{$task}->connection = $this->params['connection'];
         }
     }
     if (isset($this->params['connection'])) {
         $this->connection = $this->params['connection'];
     }
 }
開發者ID:el-cms,項目名稱:Sb,代碼行數:22,代碼來源:SbShell.php

示例10: initialize

 public function initialize()
 {
     parent::initialize();
     $this->loadComponent('RequestHandler');
     $this->loadComponent('Flash');
     $this->loadComponent('Csrf');
     $this->loadComponent('Security');
     $this->loadComponent('Paginator');
     $this->loadComponent('Cookie');
     $this->loadComponent('Auth', ['authenticate' => ['Form' => ['fields' => ['username' => 'email']], 'Cookie']]);
     SettingsData::initialize();
     SettingsData::getAll();
     $this->Cookie->configKey('CookieAuth', ['expires' => Configure::read('security.cookieAuthDuration'), 'httpOnly' => true]);
     if (SettingsData::get('debug') == true) {
         Cache::disable();
     }
     EventDispatcher::dispatch('Settings.init', $this);
 }
開發者ID:ThreeCMS,項目名稱:ThreeCMS,代碼行數:18,代碼來源:AppController.php

示例11: setUp

 /**
  * setUp method
  *
  * @return void
  */
 public function setUp()
 {
     parent::setUp();
     TableRegistry::clear();
     Cache::disable();
     Router::reload();
     //Router::fullBaseUrl('http://test.local');
     Router::scope('/', function ($routes) {
         $routes->fallbacks('DashedRoute');
     });
     $this->Articles = TableRegistry::get('Articles', ['className' => 'Seo\\Test\\TestCase\\Model\\Behavior\\ArticlesTable']);
     $this->Articles->addBehavior('Seo.Seo', $this->defaultConfig);
     $this->SeoBehavior = new SeoBehavior($this->Articles, $this->defaultConfig);
     $this->setReflectionClassInstance($this->SeoBehavior);
     //$this->defaultReflectionTarget = $this->SeoBehavior; // (optional)
     $this->defaultEntity = $this->Articles->find()->first();
     $this->locale = I18n::locale();
 }
開發者ID:orgasmicnightmare,項目名稱:cakephp-seo,代碼行數:23,代碼來源:SeoBehaviorTest.php

示例12: startup

 /**
  * Starts up the Shell and displays the welcome message.
  * Allows for checking and configuring prior to command or main execution
  *
  * Override this method if you want to remove the welcome information,
  * or otherwise modify the pre-command flow.
  *
  * @return void
  */
 public function startup()
 {
     Cache::disable();
 }
開發者ID:phpie,項目名稱:assetic-plugin,代碼行數:13,代碼來源:DumpTask.php

示例13: startup

 /**
  * Disable caching and enable debug for baking.
  * This forces the most current database schema to be used.
  *
  * @return void
  */
 public function startup()
 {
     Configure::write('debug', true);
     Cache::disable();
 }
開發者ID:rashmi,項目名稱:newrepo,代碼行數:11,代碼來源:BakeTask.php

示例14: setUp

 /**
  * setUp method
  *
  * @return void
  */
 public function setUp()
 {
     parent::setUp();
     $_GET = [];
     Configure::write('App.base', false);
     Configure::write('App.baseUrl', false);
     Configure::write('App.dir', 'app');
     Configure::write('App.webroot', 'webroot');
     Configure::write('App.namespace', 'TestApp');
     Cache::disable();
     App::objects('Plugin', null, false);
 }
開發者ID:ripzappa0924,項目名稱:carte0.0.1,代碼行數:17,代碼來源:DispatcherTest.php

示例15: dirname

<?php

/**
 * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
 *
 * Licensed under The MIT License
 * Redistributions of files must retain the above copyright notice.
 *
 * @copyright     Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
 * @link          http://cakephp.org CakePHP(tm) Project
 * @license       http://www.opensource.org/licenses/mit-license.php MIT License
 */
// include autoload from Composer
use Cake\Core\Plugin;
require dirname(__DIR__) . '/vendor/autoload.php';
// include paths from CakePHP
require dirname(__DIR__) . '/tests/paths.php';
// disable cache to avoid errors on tests
\Cake\Cache\Cache::disable();
Plugin::load('TestPlugin', ['path' => ROOT . DS . 'Plugin' . DS . 'TestPlugin' . DS]);
Plugin::load('Namespaced/Plugin', ['path' => ROOT . DS . 'Plugin' . DS . 'Namespaced' . DS . 'Plugin' . DS]);
Plugin::load('Namespaced2/TestPlugin', ['path' => ROOT . DS . 'Plugin' . DS . 'Namespaced2' . DS . 'TestPlugin' . DS]);
Plugin::load('FooBar/TestPlugin', ['path' => ROOT . DS . 'Plugin' . DS . 'FooBar' . DS . 'TestPlugin' . DS]);
開發者ID:frankfoerster,項目名稱:cakephp-asset,代碼行數:23,代碼來源:bootstrap.php


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