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;
    }