FastFeed\Tests\Parser\AbstractParserTest::getFistAttributeFromXpath PHP Метод

getFistAttributeFromXpath() защищенный Метод

protected getFistAttributeFromXpath ( $content, $query, $attribute ) : boolean | string
$content
$query
$attribute
Результат boolean | string
    protected function getFistAttributeFromXpath($content, $query, $attribute)
    {
        $node = $this->getFirstNodeFromXpath($content, $query);
        if (!$node) {
            return false;
        }
        $nodeAttr = $node->attributes->getNamedItem($attribute);
        if (!$nodeAttr) {
            return false;
        }
        return $nodeAttr->nodeValue;
    }