/** * @param string $href */ public function __construct($href = null) { parent::__construct(); if (!is_null($href)) { $this->setHref($href); } }
/** * @param Component $label */ public function __construct(Component $label = null) { parent::__construct(); if (!is_null($label)) { $this->addChild($label); } }
/** * @param integer $level * @throws UnexpectedValueException Se $level não for um inteiro * no intervalo de 1 até 6. */ public function __construct($level = 1) { parent::__construct(); if (is_int($level) && $level >= 1 && $level <= 6) { $this->level = $level; } else { throw new UnexpectedValueException('$level precisa ser um inteiro entre 1 e 6 inclusive.'); } }
/** * @param string $action Ação do formulário. * @param string $method Método de envio do formulário. */ public function __construct($action, $method = 'post') { parent::__construct(); $this->setAction($action); $this->setMethod($method); }
/** * @param string $name Nome do input * @param string $type Tipo do input */ public function __construct($name, $type = Input::TEXT) { parent::__construct(); $this->setName($name); $this->setType($type); }