/** * 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); }
/** * 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; }
/** * 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()); } }
/** * 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); }