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


PHP Component::__construct方法代碼示例

本文整理匯總了PHP中Component::__construct方法的典型用法代碼示例。如果您正苦於以下問題:PHP Component::__construct方法的具體用法?PHP Component::__construct怎麽用?PHP Component::__construct使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Component的用法示例。


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

示例1: __construct

 public function __construct(ComponentCollection $collection, $settings = array())
 {
     if (Configure::read('Sermepa')) {
         $settings = $settings + Configure::read('Sermepa');
     }
     parent::__construct($collection, $settings);
 }
開發者ID:jaykay-design,項目名稱:cakephp-sermepa,代碼行數:7,代碼來源:SermepaComponent.php

示例2: __construct

 public function __construct($domain, $path, $loader)
 {
     $this->setDomain($domain);
     $this->setPath($path);
     $this->loader = $loader;
     parent::__construct();
 }
開發者ID:mrgrain,項目名稱:jumpstart-battery,代碼行數:7,代碼來源:I18n.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: __construct

 public function __construct()
 {
     parent::__construct();
     //$this->addPropertyArray('item', array( 'label', 'page', 'target') );
     // tell the base class we handle children nodes
     $this->_has_children_handler = true;
 }
開發者ID:BackupTheBerlios,項目名稱:freeblocks-svn,代碼行數:7,代碼來源:Menu.php

示例5: array

 function __construct($params = "")
 {
     parent::__construct($params);
     if (empty($_SESSION[$this->cartId])) {
         $_SESSION[$this->cartId] = array();
     }
 }
開發者ID:kurko,項目名稱:acidphp,代碼行數:7,代碼來源:Cart.php

示例6: __construct

 public function __construct(ComponentCollection $collection, $settings = array())
 {
     parent::__construct($collection, $settings);
     $this->settings = Set::merge($this->defaults, $settings);
     $this->TwimOauth = ClassRegistry::init('Twim.TwimOauth');
     $this->TwimOauth->setDataSource($this->settings['datasource']);
 }
開發者ID:nojimage,項目名稱:cakephp-twim,代碼行數:7,代碼來源:TwitterComponent.php

示例7: __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())
 {
     parent::__construct($collection, $settings);
     $explode = explode('/', realpath(__DIR__ . DS . '..' . DS . '..'));
     $pluginName = end($explode);
     App::uses('Image', $pluginName . '.Lib');
 }
開發者ID:AntoineCuny,項目名稱:VinylStore,代碼行數:13,代碼來源:ImgComponent.php

示例8:

 function __construct()
 {
     parent::__construct();
     if (session_status() == PHP_SESSION_NONE) {
         session_start();
     }
 }
開發者ID:anla9107,項目名稱:E-butik-PHP,代碼行數:7,代碼來源:cart_model.php

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

示例10: __construct

 public function __construct(ComponentCollection $collection, array $settings = array())
 {
     parent::__construct($collection, $settings);
     $this->Controller = $collection->getController();
     $this->UserConnection = ClassRegistry::init('Social.UserConnection');
     $this->_loadOpauth();
 }
開發者ID:misfrog,項目名稱:cake-social,代碼行數:7,代碼來源:ConnectionComponent.php

示例11: __construct

 /**
  * Define the core functionality of the plugin.
  *
  * Set the plugin name and the plugin version that can be used throughout the plugin.
  * Define the locale and load the components.
  *
  * @since       {{version}}
  * @access      public
  * @param string $filename
  */
 public function __construct($filename)
 {
     $this->basename = plugin_basename($filename);
     $this->path = dirname($filename);
     $this->loader = new Loader($this->getSlug(), $this->getVersion(), $this->getBasename());
     parent::__construct();
 }
開發者ID:mrgrain,項目名稱:jumpstart-battery,代碼行數:17,代碼來源:Plugin.php

示例12: __construct

 /**
  * Constructor
  *
  * @param ComponentCollection $collection A ComponentCollection for this component
  * @param array $settings Array of settings.
  * @return RememberMeComponent
  */
 public function __construct(ComponentCollection $collection, $settings = array())
 {
     parent::__construct($collection, $settings);
     $this->_checkAndSetCookieLifeTime();
     $this->settings = Hash::merge($this->_defaults, $settings);
     $this->configureCookie($this->settings['cookie']);
 }
開發者ID:harpax,項目名稱:users,代碼行數:14,代碼來源:RememberMeComponent.php

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

示例14: __construct

 /**
  * @param OsuSignature $signature The base signature
  * @param int $x The X position of this flag
  * @param int $y The Y position of this flag
  * @param int $width The width of this flag
  * @param int $height The height of this flag
  */
 public function __construct(OsuSignature $signature, $x = 0, $y = 0, $width = 18, $height = 12)
 {
     parent::__construct($signature, $x, $y);
     $this->width = $width;
     $this->height = $height;
     $this->mc = Utils::getMemcache();
 }
開發者ID:BTCTaras,項目名稱:osusig,代碼行數:14,代碼來源:ComponentFlag.php

示例15: __construct

 /**
  * @param  string  caption
  */
 public function __construct($caption = NULL)
 {
     parent::__construct();
     $this->control = Html::el('input');
     $this->label = Html::el('label');
     $this->caption = $caption;
     $this->rules = new Rules($this);
 }
開發者ID:jakubkulhan,項目名稱:guestbook,代碼行數:11,代碼來源:FormControl.php


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