src/HtmlDomParserHelper.php
public function getPageMetas()
    {
        if (!$this->parser) {
            return;
        }

        $nodes = $this->parser->find('meta');

        $metas = array();

        foreach ($nodes as $node) {
            if ($node->hasAttribute('name')) {
                $metas[ $node->getAttribute('name') ] = $node->getAttribute('content');
            } elseif ($node->hasAttribute('property')) {
                $metas[ $node->getAttribute('property') ] = $node->getAttribute('content');
            }
        }

        return $metas;
    }
public function getPageMetas()
    {
        if (!$this->parser) {
            return;
        }

        $nodes = $this->parser->find('meta');

        $metas = array();

        foreach ($nodes as $node) {
            if ($node->hasAttribute('name')) {
                $metas[ $node->getAttribute('name') ] = $node->getAttribute('content');
            } elseif ($node->hasAttribute('property')) {
                $metas[ $node->getAttribute('property') ] = $node->getAttribute('content');
            }
        }

        return $metas;
    }
public function getPageMetas ( ) { if ( ! $ this -> parser ) { return ; } $ nodes = $ this -> parser -> find ( 'meta' ) ; $ metas = array ( ) ; foreach ( $ nodes as $ node ) { if ( $ node -> hasAttribute ( 'name' ) ) { $ metas [ $ node -> getAttribute ( 'name' ) ] = $ node -> getAttribute ( 'content' ) ; } elseif ( $ node -> hasAttribute ( 'property' ) ) { $ metas [ $ node -> getAttribute ( 'property' ) ] = $ node -> getAttribute ( 'content' ) ; } } return $ metas ; }
Get meta description

@return array metas
Get meta description