本文整理匯總了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);
}