/**
  * recupera elemento a partir da posição informada
  *
  * @param integer $elmid
  * @return ElementAbstract
  * */
 public function getElementByIndex($position)
 {
     IndexOutOfBoundsException::throwsExceptionIfParamIsNull(isset($this->_children[$position]), 'elemento inexistente');
     return $this->_children[$position];
 }
Example #2
0
 /**
  * @param integer $idx
  * @return TableData
  * */
 public function td($idx)
 {
     $idx = (int) $idx;
     IndexOutOfBoundsException::throwsExceptionIfParamIsNull(isset($this->_children[$idx]), 'elemento indisponível');
     return $this->_children[$idx];
 }
Example #3
0
 /**
  * Recupera valor armazenado na view.
  *
  * @param string $key
  * @return mixed
  * @throws IndexOutOfBoundsException
  * @example ViewAbstract::get
  * @code
  * <?php
  *      ...
  *      var_dump($this->get('foo'));
  *      ...
  * ?>
  * @encode
  * */
 public function get($key)
 {
     IndexOutOfBoundsException::throwsExceptionIfParamIsNull($this->isAssign($key), sprintf(self::T_VIEWABSTRACT_STR_ATTR_UNAVAILABLE, ucfirst($this::T_TYPE), $key));
     return $this->_data[$key];
 }