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


PHP ComponentCollection類代碼示例

本文整理匯總了PHP中ComponentCollection的典型用法代碼示例。如果您正苦於以下問題:PHP ComponentCollection類的具體用法?PHP ComponentCollection怎麽用?PHP ComponentCollection使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


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

示例1: __construct

 /**
  * Constructor
  *
  * @param ComponentCollection $collection The controller for this request.
  * @param string $settings An array of settings. This class does not use any settings.
  */
 public function __construct(ComponentCollection $collection, $settings = array())
 {
     $this->_Collection = $collection;
     $controller = $collection->getController();
     $this->controller($controller);
     $this->settings = Hash::merge($this->settings, $settings);
 }
開發者ID:TerrasAppSolutions,項目名稱:seeg-mapbiomas-workspace,代碼行數:13,代碼來源:BaseAuthorize.php

示例2: __construct

 public function __construct(ComponentCollection $collection, $settings = array())
 {
     //$settings = array_merge($this->settings, (array)$settings);
     $this->FormalWord = ClassRegistry::init('FormalWord');
     $this->Controller = $collection->getController();
     parent::__construct($collection, $settings);
 }
開發者ID:huanjian,項目名稱:mythesis,代碼行數:7,代碼來源:JanPosTaggingComponent.php

示例3: __construct

 public function __construct(ComponentCollection $collection, $settings = array())
 {
     $configSettings = (array) Configure::read('PaymentNetwork');
     $settings = array_merge($this->settings, $configSettings, (array) $settings);
     $this->Controller = $collection->getController();
     parent::__construct($collection, $settings);
 }
開發者ID:09060906,項目名稱:CakePHP-Payment-Plugin,代碼行數:7,代碼來源:PaymentNetworkComponent.php

示例4: setUp

 public function setUp()
 {
     parent::setUp();
     $this->Controller = new EnummPostsController();
     $collection = new ComponentCollection();
     $collection->init($this->Controller);
 }
開發者ID:k1low,項目名稱:enumm,代碼行數:7,代碼來源:EnummComponentTest.php

示例5: __construct

 public function __construct(ComponentCollection $collection, $settings = array())
 {
     $settings = array_merge($this->settings, (array) $settings);
     $this->Controller = $collection->getController();
     parent::__construct($collection, $settings);
     $this->init();
 }
開發者ID:a0108393,項目名稱:cms-system,代碼行數:7,代碼來源:CaptchaComponent.php

示例6: __construct

 public function __construct(ComponentCollection $Collection, $settings = array())
 {
     $settings = array_merge($this->settings, (array) $settings, (array) Configure::read('Auth'));
     $this->Controller = $Collection->getController();
     parent::__construct($Collection, $settings);
     # auto-select multi if necessary
     if ($this->settings['multi'] === null) {
         $Model = $this->getModel();
         if (!empty($Model->hasMany)) {
             foreach ($Model->hasMany as $name => $relation) {
                 if ($name != $this->roleModel) {
                     continue;
                 }
                 $this->settings['multi'] = false;
                 return;
             }
         }
         $Model = $this->getModel();
         if (!empty($Model->hasAndBelongsToMany)) {
             foreach ($Model->hasAndBelongsToMany as $name => $relation) {
                 if ($name != $this->roleModel) {
                     continue;
                 }
                 $this->settings['multi'] = true;
                 return;
             }
         }
         //$this->log('AuthExt component not configured properly (auto select multi failed)');
     }
 }
開發者ID:robksawyer,項目名稱:grabitdown,代碼行數:30,代碼來源:AuthExtComponent.php

示例7: __construct

 public function __construct(ComponentCollection $collection, $settings = array())
 {
     $settings = array_merge($this->settings, (array) $settings);
     $this->Controller = $collection->getController();
     $this->Model = $this->Controller->{$this->Controller->modelClass};
     $this->modelAlias = $this->Model->alias;
     parent::__construct($collection, $settings);
 }
開發者ID:sing-group,項目名稱:Markyt,代碼行數:8,代碼來源:BioCExportComponent.php

示例8: __construct

 /**
  * Overrides base class constructor, sets properties and merges supplied user settings.
  */
 public function __construct(ComponentCollection $collection, $settings = array())
 {
     $settings = am($this->defaults, $settings);
     $this->_parseSettings($settings);
     $this->controller = $collection->getController();
     $this->request = $this->controller->request;
     $this->_setupControllersPaths();
     parent::__construct($collection, $settings);
 }
開發者ID:netors,項目名稱:CakePHP-AutoAsset-Plugin,代碼行數:12,代碼來源:AssetCollectorComponent.php

示例9: __construct

 /**
  * Constructor
  *
  * @author	Anthony Putignano <anthony@wizehive.com>
  * @author  Everton Yoshitani <everton@wizehive.com>
  * @since	0.1
  * @param	ComponentCollection	$collection	The Component collection used on this request.
  * @param	array				$settings	Array of settings to use.
  * @return	void
  */
 public function __construct(ComponentCollection $Collection, $settings = array())
 {
     $this->Controller = $Collection->getController();
     $this->settings = Hash::merge($this->settings, $settings);
     // This needs to be called here instead in the top of this file
     App::uses('OAuth2Component', 'OAuth2.Controller' . DS . 'Component');
     $this->OAuth2Component = new OAuth2Component($Collection, $this->settings);
     $this->OAuth2Component->initialize($this->Controller);
 }
開發者ID:manzapanza,項目名稱:cakephp-api-utils,代碼行數:19,代碼來源:OAuth2Authenticate.php

示例10: __construct

 /**
  * Setup settings
  * 
  * @param ComponentCollection $collection
  * @param array $settings [optional]
  */
 public function __construct(ComponentCollection $collection, $settings = array())
 {
     $this->__controller = $collection->getController();
     parent::__construct($collection, $settings);
     //setup settings
     $this->__setupSettings($settings);
     //setup error message
     $this->__errorMsg = __d('cloggy', 'An error has detected');
 }
開發者ID:simaostephanie,項目名稱:Cloggy,代碼行數:15,代碼來源:CloggyFileUploadComponent.php

示例11: __construct

 public function __construct(ComponentCollection $collection, $settings = array())
 {
     $this->Controller = $collection->getController();
     $defaults = array('redirect' => array('add' => array(array($this, 'redirect'), array(array('action' => 'index'))), 'edit' => array(array($this, 'redirect'), array(array('action' => 'index'))), 'delete' => array(array($this, 'redirect'), array(array('action' => 'index')))));
     $settings = Hash::merge($defaults, $settings);
     // configure.
     $this->_set($settings);
     parent::__construct($collection, $settings);
 }
開發者ID:k1low,項目名稱:routine,代碼行數:9,代碼來源:RoutineComponent.php

示例12: setUp

 /**
  * setUp method
  *
  * @return void
  */
 public function setUp()
 {
     parent::setUp();
     Configure::write('Acl.classname', 'HabtmDbAcl');
     Configure::write('Acl.database', 'test');
     $Collection = new ComponentCollection();
     $this->Acl = $Collection->load('Acl', array('habtm' => array('userModel' => 'Employee', 'groupAlias' => 'Department')));
     $this->_setPermissions();
 }
開發者ID:dlpc,項目名稱:CakeWX,代碼行數:14,代碼來源:HabtmDbAclTest.php

示例13: setUp

 public function setUp()
 {
     $this->Controller = $this->getMock('AccessLimitTestController', array('dispatchMethod'), array($this->getMock('CakeRequest', array('is'), array(null, false)), $this->getMock('CakeResponse')));
     $this->Model = $this->getMockForModel('Security.AccessLimit');
     ClassRegistry::addObject('AccessLimit', $this->Model);
     $collection = new ComponentCollection();
     $collection->init($this->Controller);
     $this->Controller->Components->init($this->Controller);
     $this->AccessLimit = $this->Controller->AccessLimit;
 }
開發者ID:gourmet,項目名稱:security,代碼行數:10,代碼來源:AccessLimitComponentTest.php

示例14: __construct

 /**
  * Constructor
  *
  * @param ComponentCollection $collection
  * @param array $settings
  * @return void
  */
 public function __construct(ComponentCollection $collection, $settings = array())
 {
     $settings = array_merge($this->settings, (array) $settings);
     $this->Controller = $collection->getController();
     if (isset($settings['helper']) and $settings['helper'] !== false) {
         $this->Controller->helpers['Search'] = array('prefix' => $this->_prefix);
     }
     // <-- Cargar helper Search
     $this->setRequest($this->configs);
     parent::__construct($collection, $settings);
 }
開發者ID:arodu,項目名稱:SearchComponent-cakephp,代碼行數:18,代碼來源:SearchComponent.php

示例15: __construct

 public function __construct(ComponentCollection $collection, $settings = array())
 {
     $settings = array_merge($this->settings, (array) $settings);
     $this->Controller = $collection->getController();
     $this->CleanTweet = ClassRegistry::init('CleanTweet');
     $this->CleanRepository = ClassRegistry::init('CleanRepository');
     $this->dir = new Folder(WWW_ROOT . 'files', true, 0755);
     $this->filetraining = new File(WWW_ROOT . 'files/jan.train', true, 0644);
     $this->filetesting = new File(WWW_ROOT . 'files/jan.test', true, 0644);
     parent::__construct($collection, $settings);
 }
開發者ID:huanjian,項目名稱:mythesis,代碼行數:11,代碼來源:WeightComponent.php


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