protected function createInput($type, $name = null, $value = null, $attr = null)
    {
        if($type == 'textarea')
            $input = new Input\Textarea($name);
        else
            $input = new Input\Input($type, $name);

        if($name)
            $input->attr('id', $name);

        if($value)
            $input->value($value);
        else if(isset($this->data[$name]))
            $input->value($this->data[$name]);

        if($attr)
            $input->attr($attr);

        if(isset($this->override[$name]))
            $input->override($this->override[$name]);

        return $input;
    }
protected function createInput($type, $name = null, $value = null, $attr = null)
    {
        if($type == 'textarea')
            $input = new Input\Textarea($name);
        else
            $input = new Input\Input($type, $name);

        if($name)
            $input->attr('id', $name);

        if($value)
            $input->value($value);
        else if(isset($this->data[$name]))
            $input->value($this->data[$name]);

        if($attr)
            $input->attr($attr);

        if(isset($this->override[$name]))
            $input->override($this->override[$name]);

        return $input;
    }
protected function createInput ( $ type , $ name = null , $ value = null , $ attr = null ) { if ( $ type == 'textarea' ) $ input = new Input \ Textarea ( $ name ) ; else $ input = new Input \ Input ( $ type , $ name ) ; if ( $ name ) $ input -> attr ( 'id' , $ name ) ; if ( $ value ) $ input -> value ( $ value ) ; else if ( isset ( $ this -> data [ $ name ] ) ) $ input -> value ( $ this -> data [ $ name ] ) ; if ( $ attr ) $ input -> attr ( $ attr ) ; if ( isset ( $ this -> override [ $ name ] ) ) $ input -> override ( $ this -> override [ $ name ] ) ; return $ input ; }
Create html input
@param string $type
@param string $name
@param string|null $value
@param array|string|null $attr
@return Input\Input
Create html input