Esempio n. 1
0
 /**
  * @param	string $href
  */
 public function __construct($href = null)
 {
     parent::__construct();
     if (!is_null($href)) {
         $this->setHref($href);
     }
 }
Esempio n. 2
0
 /**
  * @param	Component $label
  */
 public function __construct(Component $label = null)
 {
     parent::__construct();
     if (!is_null($label)) {
         $this->addChild($label);
     }
 }
Esempio n. 3
0
 /**
  * @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.');
     }
 }
Esempio n. 4
0
 /**
  * @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);
 }
Esempio n. 5
0
 /**
  * @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);
 }