src/Crawler/CrawlerAbstract.php
protected function getFieldValue(
        Crawler $node,
        $defaultValue,
        $callback = null,
        $funcName = 'text',
        $funcParam = ''
    ) {
        if ($callback == null) {
            $callback = function ($value) {
                return (new DefaultSanitizer)->clean($value);
            };
        }

        if ($node->count()) {
            return $callback($node->$funcName($funcParam));
        }

        return $defaultValue;
    }
protected function getFieldValue(
        Crawler $node,
        $defaultValue,
        $callback = null,
        $funcName = 'text',
        $funcParam = ''
    ) {
        if ($callback == null) {
            $callback = function ($value) {
                return (new DefaultSanitizer)->clean($value);
            };
        }

        if ($node->count()) {
            return $callback($node->$funcName($funcParam));
        }

        return $defaultValue;
    }
protected function getFieldValue ( Crawler $ node , $ defaultValue , $ callback = null , $ funcName = 'text' , $ funcParam = '' ) { if ( $ callback == null ) { $ callback = function ( $ value ) { return ( new DefaultSanitizer ) -> clean ( $ value ) ; } ; } if ( $ node -> count ( ) ) { return $ callback ( $ node -> $ funcName ( $ funcParam ) ) ; } return $ defaultValue ; }
Return the field's value

@param Crawler $node
@param mixed $defaultValue
@param \Closure $callback
@param string $funcName
@param string $funcParam

@return mixed
Return the field s value