src/Readability.php
private function checkByline($node, $matchString)
    {
        if (!$this->configuration->getArticleByLine()) {
            return false;
        }

        /*
         * Check if the byline is already set
         */
        if ($this->getAuthor()) {
            return false;
        }

        $rel = $node->getAttribute('rel');

        if ($rel === 'author' || preg_match(NodeUtility::$regexps['byline'], $matchString) && $this->isValidByline($node->getTextContent())) {
            $this->logger->info(sprintf('[Metadata] Found article author: \'%s\'', $node->getTextContent()));
            $this->setAuthor(trim($node->getTextContent()));

            return true;
        }

        return false;
    }
private function checkByline($node, $matchString)
    {
        if (!$this->configuration->getArticleByLine()) {
            return false;
        }

        /*
         * Check if the byline is already set
         */
        if ($this->getAuthor()) {
            return false;
        }

        $rel = $node->getAttribute('rel');

        if ($rel === 'author' || preg_match(NodeUtility::$regexps['byline'], $matchString) && $this->isValidByline($node->getTextContent())) {
            $this->logger->info(sprintf('[Metadata] Found article author: \'%s\'', $node->getTextContent()));
            $this->setAuthor(trim($node->getTextContent()));

            return true;
        }

        return false;
    }
private function checkByline ( $ node , $ matchString ) { if ( ! $ this -> configuration -> getArticleByLine ( ) ) { return false ; } /*
         * Check if the byline is already set
         */ if ( $ this -> getAuthor ( ) ) { return false ; } $ rel = $ node -> getAttribute ( 'rel' ) ; if ( $ rel === 'author' || preg_match ( NodeUtility :: $ regexps [ 'byline' ] , $ matchString ) && $ this -> isValidByline ( $ node -> getTextContent ( ) ) ) { $ this -> logger -> info ( sprintf ( '[Metadata] Found article author: \'%s\'' , $ node -> getTextContent ( ) ) ) ; $ this -> setAuthor ( trim ( $ node -> getTextContent ( ) ) ) ; return true ; } return false ; }
Checks if the node is a byline.

@param DOMNode $node
@param string $matchString

@return bool
Checks if the node is a byline .