当前位置: 首页>>代码示例>>PHP>>正文


PHP Configure::delete方法代码示例

本文整理汇总了PHP中Cake\Core\Configure::delete方法的典型用法代码示例。如果您正苦于以下问题:PHP Configure::delete方法的具体用法?PHP Configure::delete怎么用?PHP Configure::delete使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Cake\Core\Configure的用法示例。


在下文中一共展示了Configure::delete方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: setUp

 /**
  * @return void
  */
 public function setUp()
 {
     parent::setUp();
     Configure::delete('FormConfig');
     $this->View = new View(null);
     $this->Form = new FormHelper($this->View);
 }
开发者ID:alescx,项目名称:cakephp-tools,代码行数:10,代码来源:FormHelperTest.php

示例2: 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

示例3: setUp

 public function setUp()
 {
     parent::setUp();
     Configure::delete('GoogleMap');
     $this->View = new View(null);
     $this->GoogleMap = new GoogleMapHelper($this->View);
 }
开发者ID:dereuromark,项目名称:cakephp-geo,代码行数:7,代码来源:GoogleMapHelperTest.php

示例4: setUp

 /**
  * @return void
  */
 public function setUp()
 {
     parent::setUp();
     Configure::write('App.namespace', 'TestApp');
     Configure::write('Ajax');
     Configure::delete('Flash');
     $this->Controller = new AjaxComponentTestController(new Request(), new Response());
 }
开发者ID:dereuromark,项目名称:cakephp-ajax,代码行数:11,代码来源:AjaxComponentTest.php

示例5: setUp

 /**
  * setup
  *
  * @return void
  */
 public function setUp()
 {
     parent::setUp();
     //$this->connection = ConnectionManager::get('test');
     $options = ['alias' => 'Articles'];
     $this->articles = TableRegistry::get('SluggedArticles', $options);
     Configure::delete('Slugged');
     $this->articles->addBehavior('Tools.Slugged');
 }
开发者ID:alescx,项目名称:cakephp-tools,代码行数:14,代码来源:SluggedBehaviorTest.php

示例6: setUp

 /**
  * SetUp method
  *
  * @return void
  */
 public function setUp()
 {
     parent::setUp();
     Configure::write('App.namespace', 'TestApp');
     Configure::delete('Passwordable');
     Configure::write('Passwordable.auth', 'AuthTest');
     $this->Users = TableRegistry::get('ToolsUsers');
     $this->hasher = PasswordHasherFactory::build('Default');
     Router::setRequestInfo(new Request());
 }
开发者ID:dereuromark,项目名称:cakephp-tools,代码行数:15,代码来源:PasswordableBehaviorTest.php

示例7: setUp

 /**
  * setUp method
  *
  * @return void
  */
 public function setUp()
 {
     parent::setUp();
     Configure::delete('DatabaseLog.limit');
     Configure::delete('DatabaseLog.maxLength');
     $this->out = new ConsoleOutput();
     $this->err = new ConsoleOutput();
     $io = new ConsoleIo($this->out, $this->err);
     $this->Shell = $this->getMockBuilder(DatabaseLogShell::class)->setMethods(['in', '_stop'])->setConstructorArgs([$io])->getMock();
 }
开发者ID:dereuromark,项目名称:cakephp-databaselog,代码行数:15,代码来源:DatabaseLogShellTest.php

示例8: setUp

 public function setUp()
 {
     parent::setUp();
     Router::reload();
     if ($this->defaultLocale === null) {
         $this->defaultLocale = ini_get('intl.default_locale');
     }
     ini_set('intl.default_locale', 'de_DE');
     Configure::delete('Meta');
     $request = new Request();
     $request->params['controller'] = 'ControllerName';
     $request->params['action'] = 'actionName';
     $View = new View($request);
     $this->Meta = new MetaHelper($View);
 }
开发者ID:dereuromark,项目名称:cakephp-meta,代码行数:15,代码来源:MetaHelperTest.php

示例9: setUp

 /**
  * SetUp method
  *
  * @return void
  */
 public function setUp()
 {
     parent::setUp();
     Configure::write('App.namespace', 'TestApp');
     Configure::delete('Passwordable');
     Configure::write('Passwordable.auth', 'AuthTest');
     $this->Users = TableRegistry::get('ToolsUsers');
     $this->hasher = PasswordHasherFactory::build('Default');
     $user = $this->Users->newEntity();
     $data = ['id' => '5', 'name' => 'admin', 'password' => $this->hasher->hash('somepwd'), 'role_id' => '1'];
     $this->Users->patchEntity($user, $data);
     $result = $this->Users->save($user);
     $this->assertTrue((bool) $result);
     Router::setRequestInfo(new Request());
 }
开发者ID:olmprakash,项目名称:cakephp-tools,代码行数:20,代码来源:PasswordableBehaviorTest.php

示例10: setUp

 /**
  * SetUp method
  *
  * @return void
  */
 public function setUp()
 {
     parent::setUp();
     Request::addDetector('mobile', function ($request) {
         $detector = new MobileDetect();
         return $detector->isMobile();
     });
     Request::addDetector('tablet', function ($request) {
         $detector = new MobileDetect();
         return $detector->isTablet();
     });
     $this->event = new Event('Controller.beforeFilter');
     $this->Controller = new MobileComponentTestController(new Request());
     $this->Controller->request->session()->delete('User');
     Configure::delete('User');
 }
开发者ID:dereuromark,项目名称:cakephp-tools,代码行数:21,代码来源:MobileComponentTest.php

示例11: render

 /**
  * Display all flash messages.
  *
  * TODO: export div wrapping method (for static messaging on a page)
  *
  * @param array $types Types to output. Defaults to all if none are specified.
  * @return string HTML
  */
 public function render(array $types = [])
 {
     // Get the messages from the session
     $messages = (array) $this->request->session()->read('FlashMessage');
     $cMessages = (array) Configure::read('FlashMessage');
     if (!empty($cMessages)) {
         $messages = (array) Hash::merge($messages, $cMessages);
     }
     $html = '';
     if (!empty($messages)) {
         $html = '<div class="flash-messages">';
         if ($types) {
             foreach ($types as $type) {
                 // Add a div for each message using the type as the class.
                 foreach ($messages as $messageType => $msgs) {
                     if ($messageType !== $type) {
                         continue;
                     }
                     foreach ((array) $msgs as $msg) {
                         $html .= $this->_message($msg, $messageType);
                     }
                 }
             }
         } else {
             foreach ($messages as $messageType => $msgs) {
                 foreach ((array) $msgs as $msg) {
                     $html .= $this->_message($msg, $messageType);
                 }
             }
         }
         $html .= '</div>';
         if ($types) {
             foreach ($types as $type) {
                 $this->request->session()->delete('FlashMessage.' . $type);
                 Configure::delete('FlashMessage.' . $type);
             }
         } else {
             $this->request->session()->delete('FlashMessage');
             Configure::delete('FlashMessage');
         }
     }
     return $html;
 }
开发者ID:alescx,项目名称:cakephp-tools,代码行数:51,代码来源:FlashHelper.php

示例12: setUp

 public function setUp()
 {
     parent::setUp();
     Configure::write('Config.language', 'eng');
     Configure::write('App.base', '');
     Configure::write('App.namespace', 'BootstrapUI\\Test\\TestCase\\View\\Helper');
     Configure::delete('Asset');
     $this->View = new View();
     $this->Form = new FormHelper($this->View);
     $request = new Request('articles/add');
     $request->here = '/articles/add';
     $request['controller'] = 'articles';
     $request['action'] = 'add';
     $request->webroot = '';
     $request->base = '';
     $this->Form->Url->request = $this->Form->request = $request;
     $this->article = ['schema' => ['id' => ['type' => 'integer'], 'author_id' => ['type' => 'integer', 'null' => true], 'title' => ['type' => 'string', 'null' => true], 'body' => 'text', 'published' => ['type' => 'boolean', 'length' => 1, 'default' => 0], '_constraints' => ['primary' => ['type' => 'primary', 'columns' => ['id']]]], 'required' => ['author_id' => true, 'title' => true]];
     Security::salt('foo!');
     Router::connect('/:controller', ['action' => 'index']);
     Router::connect('/:controller/:action/*');
 }
开发者ID:2km,项目名称:bootstrap-ui,代码行数:21,代码来源:FormHelperTest.php

示例13: testDefaultProfile

 /**
  * test that default profile is used by constructor if available.
  *
  * @return void
  */
 public function testDefaultProfile()
 {
     $config = ['test' => 'ok', 'test2' => true];
     Configure::write('Email.default', $config);
     Email::config(Configure::consume('Email'));
     $Email = new Email();
     $this->assertSame($Email->profile(), $config);
     Configure::delete('Email');
     Email::drop('default');
 }
开发者ID:rashmi,项目名称:newrepo,代码行数:15,代码来源:EmailTest.php

示例14: catch

/**
* Additional bootstrapping and configuration for CLI environments should
* be put here.
*/
try {
    Plugin::load('Bake');
} catch (MissingPluginException $e) {
    // Do not halt if the plugin is missing
}
/**
 * Cakebox: use Monolog to create a combined log (with all log levels) to enable
 * Logstash > Elasticsearch forwarding. This logger is different from the one in
 * bootstrap.php in that is uses the 'cli' prefix tag instead of 'app'.
*/
Log::config('default', function () {
    if (is_writable('/var/log/cakephp')) {
        $handler = new StreamHandler('/var/log/cakephp/cakebox.cli.log');
    } else {
        $handler = new StreamHandler(LOGS . DS . 'cakebox.cli.log');
    }
    $formatter = new LogstashFormatter('cakephp');
    $handler->setFormatter($formatter);
    $log = new Logger('cli.cakebox', array($handler));
    return $log;
});
/**
 * Stop using the now redundant default CakePHP file loggers.
 */
Configure::delete('Log.debug');
Configure::delete('Log.error');
开发者ID:alt3,项目名称:cakebox-console,代码行数:30,代码来源:bootstrap_cli.php

示例15: setUp

 /**
  * setUp method
  *
  * @return void
  */
 public function setUp()
 {
     parent::setUp();
     Configure::write('Config.language', 'eng');
     Configure::write('App.base', '');
     Configure::write('App.namespace', 'Cake\\Test\\TestCase\\View\\Helper');
     Configure::delete('Asset');
     $this->View = new View();
     $this->Form = new FormHelper($this->View);
     $request = new Request('articles/add');
     $request->here = '/articles/add';
     $request['controller'] = 'articles';
     $request['action'] = 'add';
     $request->webroot = '';
     $request->base = '';
     $this->Form->Url->request = $this->Form->request = $request;
     $this->dateRegex = ['daysRegex' => 'preg:/(?:<option value="0?([\\d]+)">\\1<\\/option>[\\r\\n]*)*/', 'monthsRegex' => 'preg:/(?:<option value="[\\d]+">[\\w]+<\\/option>[\\r\\n]*)*/', 'yearsRegex' => 'preg:/(?:<option value="([\\d]+)">\\1<\\/option>[\\r\\n]*)*/', 'hoursRegex' => 'preg:/(?:<option value="0?([\\d]+)">\\1<\\/option>[\\r\\n]*)*/', 'minutesRegex' => 'preg:/(?:<option value="([\\d]+)">0?\\1<\\/option>[\\r\\n]*)*/', 'meridianRegex' => 'preg:/(?:<option value="(am|pm)">\\1<\\/option>[\\r\\n]*)*/'];
     $this->article = ['schema' => ['id' => ['type' => 'integer'], 'author_id' => ['type' => 'integer', 'null' => true], 'title' => ['type' => 'string', 'null' => true], 'body' => 'text', 'published' => ['type' => 'string', 'length' => 1, 'default' => 'N'], '_constraints' => ['primary' => ['type' => 'primary', 'columns' => ['id']]]], 'required' => ['author_id' => true, 'title' => true]];
     Security::salt('foo!');
     Router::connect('/:controller', ['action' => 'index']);
     Router::connect('/:controller/:action/*');
 }
开发者ID:jeremyheaton,项目名称:ultiswap,代码行数:27,代码来源:FormHelperTest.php


注:本文中的Cake\Core\Configure::delete方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。