Window.php
/**
     * Adds an element to the output and returns it.
     *
     * @param string $id
     * @access public
     * @return Element
     */
Adds an element to the output and returns it.
@param string $id
@access public
@return Element
Adds an element to the output and returns it . @param string $id @access public @return Element
public function addElement($id, $type = 'Element')
    {
        if (!isset($this->_elements[$id])) {
            $type = __namespace__ . '\\Output\\' . ucfirst($type);
            $element = new $type($id);
            $this->_elements[$id] = $element;
            $element->setParent($this);
            return $element;
        } else {
            throw new Exception("An element with id {$id} already exists");
        }
    }
public function addElement ( $ id , $ type = 'Element' ) { if ( ! isset ( $ this -> _elements [ $ id ] ) ) { $ type = __namespace__ . '\\Output\\' . ucfirst ( $ type ) ; $ element = new $ type ( $ id ) ; $ this -> _elements [ $ id ] = $ element ; $ element -> setParent ( $ this ) ; return $ element ; } else { throw new Exception ( " An element with id  { $ id }  already exists " ) ; } }
Adds an element to the output and returns it.
Adds an element to the output and returns it .