tag.php
protected function createInputTag($attributes)
    {
        if (! isset($attributes['type'])) {
            return new SimpleTextTag($attributes);
        }
        $type = strtolower(trim($attributes['type']));
        $map  = array(
            'submit'   => 'SimpleSubmitTag',
            'image'    => 'SimpleImageSubmitTag',
            'checkbox' => 'SimpleCheckboxTag',
            'radio'    => 'SimpleRadioButtonTag',
            'text'     => 'SimpleTextTag',
            'hidden'   => 'SimpleTextTag',
            'password' => 'SimpleTextTag',
            'file'     => 'SimpleUploadTag'
        );
        if (array_key_exists($type, $map)) {
            $tag_class = $map[$type];

            return new $tag_class($attributes);
        }

        return false;
    }
protected function createInputTag($attributes)
    {
        if (! isset($attributes['type'])) {
            return new SimpleTextTag($attributes);
        }
        $type = strtolower(trim($attributes['type']));
        $map  = array(
            'submit'   => 'SimpleSubmitTag',
            'image'    => 'SimpleImageSubmitTag',
            'checkbox' => 'SimpleCheckboxTag',
            'radio'    => 'SimpleRadioButtonTag',
            'text'     => 'SimpleTextTag',
            'hidden'   => 'SimpleTextTag',
            'password' => 'SimpleTextTag',
            'file'     => 'SimpleUploadTag'
        );
        if (array_key_exists($type, $map)) {
            $tag_class = $map[$type];

            return new $tag_class($attributes);
        }

        return false;
    }
Factory for input tags.

@param hash $attributes    Element attributes.

@return SimpleTag          Tag object.