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


PHP ComponentCollection::getController方法代码示例

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


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

示例1: __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

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

示例3: __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

示例4: __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

示例5: __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

示例6: __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

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

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

 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

示例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())
 {
     $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

示例12: __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

示例13: __construct

 /**
  * Constructor
  *
  * @param object Controller object
  */
 public function __construct(ComponentCollection $collection, $settings)
 {
     $this->controller = $collection->getController();
     $this->_defaults = Set::merge($this->_defaults, $settings);
     # fix for not throwing warning
     if (!isset($this->controller->presetVars)) {
         $this->controller->presetVars = array();
     }
     $model = $this->controller->modelClass;
     if (!empty($settings['model'])) {
         $model = $settings['model'];
     }
     if ($this->controller->presetVars === true) {
         // auto-set the presetVars based on search defitions in model
         $this->controller->presetVars = array();
         $filterArgs = $this->controller->{$model}->filterArgs;
         foreach ($filterArgs as $key => $arg) {
             if ($var = $this->_parseFromModel($arg, $key)) {
                 $this->controller->presetVars[] = $var;
             }
         }
     }
     foreach ($this->controller->presetVars as $key => $field) {
         if ($field === true) {
             if (isset($this->controller->{$model}->filterArgs[$key])) {
                 $field = $this->_parseFromModel($this->controller->{$model}->filterArgs[$key], $key);
             } else {
                 $field = array('type' => 'value');
             }
         }
         if (!isset($field['field'])) {
             $field['field'] = $key;
         }
         $this->controller->presetVars[$key] = $field;
     }
 }
开发者ID:khaled-saiful-islam,项目名称:zen_v1.0,代码行数:41,代码来源:PrgComponent.php

示例14: __construct

 /**
  * Public constructor for the SassComponent
  *
  * @param ComponentCollection $collection
  * @param array               $settings
  */
 public function __construct(ComponentCollection $collection, $settings = array())
 {
     $this->controller = $collection->getController();
     $settings = array_merge($settings, (array) Configure::read('SassCompiler'));
     parent::__construct($collection, array_merge($this->settings, (array) $settings));
     // Don't execute the component if the debuglevel is 0
     // unless compileSass requestparameter is supplied
     // if autoRun is true then ALWAYS run the component
     if (!Configure::read('debug') && !isset($this->controller->request->query['forceSassToCompile']) && false === $this->settings['autoRun']) {
         $this->enabled = false;
         return false;
     }
     if (isset($this->controller->request->query['forceSassToCompile'])) {
         $this->settings['forceCompiling'] = true;
     }
     $this->_checkVersion();
     $this->cacheKey .= $this->Session->read('Config.userAgent');
     $this->_createCacheConfig();
     $this->_setFolders();
 }
开发者ID:jxav,项目名称:SassCompiler,代码行数:26,代码来源:SassComponent.php

示例15: __construct

 /**
  * Constructor
  *
  * @param ComponentCollection $collection A ComponentCollection this component can use to lazy load its components
  * @param array $settings Array of configuration settings.
  */
 public function __construct(ComponentCollection $collection, $settings = array())
 {
     $settings = array_merge(array('page' => 1, 'limit' => 20), (array) $settings);
     $this->Controller = $collection->getController();
     parent::__construct($collection, $settings);
 }
开发者ID:no2key,项目名称:Web-Framework-Benchmark,代码行数:12,代码来源:paginator.php


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