public function input($type, $name, $value = '', $options = [])
    {
        if (!isset($options['id'])) {
            $options['id'] = $name;
        }

        if (!empty($value)) {
            $options['value'] = $value;
        }

        $options['type'] = $type;
        $options['name'] = $name;

        return '<input'.$this->attributes($options).'>';
    }
public function input($type, $name, $value = '', $options = [])
    {
        if (!isset($options['id'])) {
            $options['id'] = $name;
        }

        if (!empty($value)) {
            $options['value'] = $value;
        }

        $options['type'] = $type;
        $options['name'] = $name;

        return '<input'.$this->attributes($options).'>';
    }
public function input ( $ type , $ name , $ value = '' , $ options = [ ] ) { if ( ! isset ( $ options [ 'id' ] ) ) { $ options [ 'id' ] = $ name ; } if ( ! empty ( $ value ) ) { $ options [ 'value' ] = $ value ; } $ options [ 'type' ] = $ type ; $ options [ 'name' ] = $ name ; return '<input' . $ this -> attributes ( $ options ) . '>' ; }
Creates a form input element.

@param string $type    - The type of form input
@param string $name    - The name of the input
@param string $value   - The value of the input
@param array  $options - The input's options

@return string
Creates a form input element .