SimpleForm::setEncodingClass PHP Method

setEncodingClass() protected method

Creates the request packet to be sent by the form.
protected setEncodingClass ( SimpleTag $tag ) : string
$tag SimpleTag Form tag to read.
return string Packet class.
    protected function setEncodingClass($tag)
    {
        if (strtolower($tag->getAttribute('method')) === 'post') {
            if (strtolower($tag->getAttribute('enctype')) === 'multipart/form-data') {
                return 'SimpleMultipartEncoding';
            }
            return 'SimplePostEncoding';
        }
        return 'SimpleGetEncoding';
    }