本文整理汇总了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);
}
示例2: __construct
public function __construct($domain, $path, $loader)
{
$this->setDomain($domain);
$this->setPath($path);
$this->loader = $loader;
parent::__construct();
}
示例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);
}
示例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;
}
示例5: array
function __construct($params = "")
{
parent::__construct($params);
if (empty($_SESSION[$this->cartId])) {
$_SESSION[$this->cartId] = array();
}
}
示例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']);
}
示例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');
}
示例8:
function __construct()
{
parent::__construct();
if (session_status() == PHP_SESSION_NONE) {
session_start();
}
}
示例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);
}
示例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();
}
示例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();
}
示例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']);
}
示例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();
}
示例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();
}
示例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);
}