src/Forms/Form.php
public function getAttributesHTML($attrs = null)
    {
        $exclude = (is_string($attrs)) ? func_get_args() : null;

        $attrs = $this->getAttributes();

        // Remove empty
        $attrs = array_filter((array)$attrs, function ($value) {
            return ($value || $value === 0);
        });

        // Remove excluded
        if ($exclude) {
            $attrs = array_diff_key($attrs, array_flip($exclude));
        }

        // Prepare HTML-friendly 'method' attribute (lower-case)
        if (isset($attrs['method'])) {
            $attrs['method'] = strtolower($attrs['method']);
        }

        // Create markup
        $parts = array();
        foreach ($attrs as $name => $value) {
            $parts[] = ($value === true) ? "{$name}=\"{$name}\"" : "{$name}=\"" . Convert::raw2att($value) . "\"";
        }

        return implode(' ', $parts);
    }
public function getAttributesHTML($attrs = null)
    {
        $exclude = (is_string($attrs)) ? func_get_args() : null;

        $attrs = $this->getAttributes();

        // Remove empty
        $attrs = array_filter((array)$attrs, function ($value) {
            return ($value || $value === 0);
        });

        // Remove excluded
        if ($exclude) {
            $attrs = array_diff_key($attrs, array_flip($exclude));
        }

        // Prepare HTML-friendly 'method' attribute (lower-case)
        if (isset($attrs['method'])) {
            $attrs['method'] = strtolower($attrs['method']);
        }

        // Create markup
        $parts = array();
        foreach ($attrs as $name => $value) {
            $parts[] = ($value === true) ? "{$name}=\"{$name}\"" : "{$name}=\"" . Convert::raw2att($value) . "\"";
        }

        return implode(' ', $parts);
    }
public function getAttributesHTML ( $ attrs = null ) { $ exclude = ( is_string ( $ attrs ) ) ? func_get_args ( ) : null ; $ attrs = $ this -> getAttributes ( ) ; // Remove empty $ attrs = array_filter ( ( array ) $ attrs , function ( $ value ) { return ( $ value || $ value === 0 ) ; } ) ; // Remove excluded if ( $ exclude ) { $ attrs = array_diff_key ( $ attrs , array_flip ( $ exclude ) ) ; } // Prepare HTML-friendly 'method' attribute (lower-case) if ( isset ( $ attrs [ 'method' ] ) ) { $ attrs [ 'method' ] = strtolower ( $ attrs [ 'method' ] ) ; } // Create markup $ parts = array ( ) ; foreach ( $ attrs as $ name => $ value ) { $ parts [ ] = ( $ value === true ) ? "{$name}=\"{$name}\"" : "{$name}=\"" . Convert :: raw2att ( $ value ) . "\"" ; } return implode ( ' ' , $ parts ) ; }
Return the attributes of the form tag - used by the templates.

@param array $attrs Custom attributes to process. Falls back to {@link getAttributes()}.
If at least one argument is passed as a string, all arguments act as excludes by name.

@return string HTML attributes, ready for insertion into an HTML tag
Return the attributes of the form tag - used by the templates .