本文整理汇总了PHP中ObjectConfig::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP ObjectConfig::__construct方法的具体用法?PHP ObjectConfig::__construct怎么用?PHP ObjectConfig::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ObjectConfig
的用法示例。
在下文中一共展示了ObjectConfig::__construct方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
/**
* Constructor.
*
* @param string $name The event name
* @param array|\Traversable $attributes An associative array or a Traversable object instance
* @param ObjectInterface $target The event target
*/
public function __construct($name = '', $attributes = array(), $target = null)
{
parent::__construct($attributes);
$this->setName($name);
$this->setTarget($target);
$this->setAttributes($attributes);
}
示例2: __construct
/**
* Constructor.
*
* @param string $name The command name
* @param array|ObjectConfig An associative array of configuration settings or a ObjectConfig instance.
*/
public function __construct($name, $config = array())
{
parent::__construct($config);
$this->append(array('icon' => 'icon-32-' . $name, 'id' => $name, 'label' => ucfirst($name), 'disabled' => false, 'title' => '', 'href' => null, 'attribs' => array('class' => array())));
//Create the children array
$this->_commands = array();
//Set the command name
$this->_name = $name;
}
示例3: __construct
/**
* Constructor.
*
* @param array|\Traversable $attributes An associative array or a Traversable object instance
*/
public function __construct($attributes = array())
{
ObjectConfig::__construct($attributes);
//Set the subject and the name
if ($attributes instanceof ModelContextInterface) {
$this->setSubject($attributes->getSubject());
$this->setName($attributes->getName());
}
}
示例4: __construct
/**
* Constructor.
*
* @param string $name The command name
* @param array|\Traversable $attributes An associative array or a Traversable object instance
* @param mixed $subject The command subject
*/
public function __construct($name = '', $attributes = array(), $subject = null)
{
parent::__construct($attributes);
$this->setName($name);
$this->setSubject($subject);
}