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