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


PHP Configure::write方法代码示例

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


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

示例1: setUp

 /**
  * Setup
  *
  * @return void
  */
 public function setUp()
 {
     parent::setUp();
     Configure::write('App.namespace', 'TestApp');
     Configure::write('Security.salt', 'not-the-default');
     $this->object = $this->getObjectForTrait('Cake\\Routing\\RequestActionTrait');
 }
开发者ID:ripzappa0924,项目名称:carte0.0.1,代码行数:12,代码来源:RequestActionTraitTest.php

示例2: setUp

 /**
  * @return void
  */
 public function setUp()
 {
     parent::setUp();
     Configure::write('App.namespace', 'TestApp');
     $this->Comments = TableRegistry::get('BitmaskedComments');
     $this->Comments->addBehavior('Tools.Bitmasked', ['mappedField' => 'statuses']);
 }
开发者ID:dereuromark,项目名称:cakephp-tools,代码行数:10,代码来源:BitmaskedBehaviorTest.php

示例3: setUp

 public function setUp()
 {
     parent::setUp();
     Configure::write('App.namespace', 'TestApp');
     $this->Comments = TableRegistry::get('JsonableComments');
     $this->Comments->addBehavior('Tools.Jsonable', ['fields' => ['details']]);
 }
开发者ID:repher,项目名称:cakephp-tools,代码行数:7,代码来源:JsonableBehaviorTest.php

示例4: testBake

 /**
  * Test generating code.
  *
  * @return void
  */
 public function testBake()
 {
     Configure::write('App.namespace', 'Bake\\Test\\App');
     $this->Task->expects($this->once())->method('createFile')->with($this->_normalizePath(APP . 'Model/Behavior/ExampleBehavior.php'), $this->stringContains('class ExampleBehavior extends Behavior'));
     $result = $this->Task->bake('Example');
     $this->assertSameAsFile(__FUNCTION__ . '.php', $result);
 }
开发者ID:rashmi,项目名称:newrepo,代码行数:12,代码来源:SimpleBakeTaskTest.php

示例5: setUp

 /**
  * setUp
  *
  * @return void
  */
 public function setUp()
 {
     parent::setUp();
     Configure::write('Acl.classname', 'DbAcl');
     Configure::write('Acl.database', 'test');
     $this->Task = $this->getMock('Acl\\AclExtras', ['in', 'out', 'hr', 'createFile', 'error', 'err', 'clear', 'getControllerList']);
 }
开发者ID:edukondaluetg,项目名称:acl,代码行数:12,代码来源:AclExtrasTest.php

示例6: setUp

 /**
  * @return void
  */
 public function setUp()
 {
     parent::setUp();
     $this->event = new Event('Controller.beforeFilter');
     $this->Controller = new UrlComponentTestController(new Request());
     Configure::write('App.fullBaseUrl', 'http://localhost');
 }
开发者ID:dereuromark,项目名称:cakephp-tools,代码行数:10,代码来源:UrlComponentTest.php

示例7: setUp

 /**
  * setUp method
  *
  * @return void
  */
 public function setUp()
 {
     parent::setUp();
     Configure::write('Acl.classname', __NAMESPACE__ . '\\CachedDbAclTwoTest');
     $this->CachedDb = new CachedDbAclTwoTest();
     Cache::config('tests', ['engine' => 'File', 'path' => TMP, 'prefix' => 'test_']);
 }
开发者ID:edukondaluetg,项目名称:acl,代码行数:12,代码来源:CacheDbAclTest.php

示例8: setUp

 /**
  * setUp method
  *
  * @return void
  */
 public function setUp()
 {
     parent::setUp();
     Configure::write('debug', true);
     Log::drop('stderr');
     Log::drop('stdout');
 }
开发者ID:alexunique0519,项目名称:Blog_Cakephp_association,代码行数:12,代码来源:DebuggerTest.php

示例9: setUp

 /**
  * setup test
  *
  * @return void
  */
 public function setUp()
 {
     parent::setUp();
     $this->io = $this->getMock('Cake\\Console\\ConsoleIo', [], [], '', false);
     $this->Shell = $this->getMock('Bake\\Shell\\BakeShell', ['in', 'out', 'hr', 'err', 'createFile', '_stop'], [$this->io]);
     Configure::write('App.namespace', 'Bake\\Test\\App');
 }
开发者ID:neilan35,项目名称:betterwindow1,代码行数:12,代码来源:BakeShellTest.php

示例10: testIndexNotAuthorized

 /**
  * Test if the index request is authorized.
  *
  * @return void
  */
 public function testIndexNotAuthorized()
 {
     Configure::write('CA.Models.articles', 'Articles');
     $this->get('/admin/posttypes/articles/index');
     $this->assertResponseSuccess();
     $this->assertRedirect('/admin');
 }
开发者ID:cakemanager,项目名称:cakephp-cakeadmin,代码行数:12,代码来源:SettingsControllerTest.php

示例11: mergeConfig

 /**
  * Merge Configuration
  *
  * @param string $key Configure key
  * @param array $config New configuration to merge
  * @param return array Array of merged configurations
  */
 public static function mergeConfig($key, $config)
 {
     $values = Configure::read($key);
     $values = Hash::merge((array) $values, $config);
     Configure::write($key, $values);
     return $values;
 }
开发者ID:mohammadsaleh,项目名称:spider,代码行数:14,代码来源:Spider.php

示例12: setUp

 /**
  * setUp method
  *
  * @return void
  */
 public function setUp()
 {
     parent::setUp();
     Configure::write('App.namespace', 'TestApp');
     $this->View = new UIView();
     $this->View->layout = 'default';
 }
开发者ID:olafthelofty,项目名称:carenta,代码行数:12,代码来源:UIViewTraitTest.php

示例13: setUp

 /**
  * setUp method
  *
  * @return void
  */
 public function setUp()
 {
     parent::setUp();
     Configure::write('Captcha', ['debug' => false]);
     $config = [];
     $this->Math = new MathEngine($config);
 }
开发者ID:dereuromark,项目名称:cakephp-captcha,代码行数:12,代码来源:MathEngineTest.php

示例14: initialize

 public function initialize()
 {
     parent::initialize();
     /**
      * Define Content settings
      */
     Configure::write('Content', ['defaultUsersTable' => 'Users', 'defaultRolesTable' => 'Roles', 'defaultSiteId' => 1]);
     /**
      * Manage site selector
      */
     if ($this->request->is(['patch', 'post', 'put'])) {
         if (isset($this->request->data['current_site_id'])) {
             $this->request->session()->write('Content.currentSiteId', intval($this->request->data['current_site_id']));
         }
     }
     $this->CmsSites = TableRegistry::get('Content.CmsSites');
     $sites = $this->CmsSites->find('all')->toArray();
     $site_selector = [];
     foreach ($sites as $row) {
         $site_selector[$row->id] = $row->name;
         if (!$this->request->session()->check('Content.currentSiteId')) {
             $this->request->session()->write('Content.currentSiteId', $row->id);
         }
     }
     $this->set(compact('site_selector'));
 }
开发者ID:aoliverio,项目名称:content,代码行数:26,代码来源:AppController.php

示例15: setUp

 public function setUp()
 {
     parent::setUp();
     Configure::write('debug', false);
     $this->Articles = TableRegistry::get('Articles');
     $this->Authors = TableRegistry::get('Authors');
 }
开发者ID:andrej-griniuk,项目名称:cakephp-fractal-transformer-view,代码行数:7,代码来源:FractalTransformerViewTest.php


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