src/Support/Parser.php
public static function fieldName($body, $fieldName, $attr = 'value')
    {
        $crawler = $body instanceof Crawler ? $body : new Crawler((string)$body);

        return $crawler->filterXPath('//input[@name="' . $fieldName . '"]')->attr($attr);
    }
public static function fieldName($body, $fieldName, $attr = 'value')
    {
        $crawler = $body instanceof Crawler ? $body : new Crawler((string)$body);

        return $crawler->filterXPath('//input[@name="' . $fieldName . '"]')->attr($attr);
    }
public static function fieldName ( $ body , $ fieldName , $ attr = 'value' ) { $ crawler = $ body instanceof Crawler ? $ body : new Crawler ( ( string ) $ body ) ; return $ crawler -> filterXPath ( '//input[@name="' . $ fieldName . '"]' ) -> attr ( $ attr ) ; }
Parser the form control name`s attribute

@param string|object|Crawler $body
@param string                $fieldName
@param string                $attr

@return string
Parser the form control name s attribute