src/Support/UserAgent/Agents/Nodes.php
protected function parse()
    {
        // Parse Nodes user agent
        if (!preg_match('|Nodes/(.*)\s\((.*)\)|s', $this->userAgent, $match)) {
            return;
        }

        // Put matches into their own variables
        list($version, $parameters) = array_slice($match, 1);

        // Split comma-separated parameters
        $parameters = explode(',', $parameters);

        // Set version if available
        if (!empty($version)) {
            $this->setVersion($version);
        }

        // Set parameters if available
        if (!empty($parameters)) {
            $this->setParameters($parameters);
        }

        // Mark parsing as successful
        $this->successful = true;
    }
protected function parse()
    {
        // Parse Nodes user agent
        if (!preg_match('|Nodes/(.*)\s\((.*)\)|s', $this->userAgent, $match)) {
            return;
        }

        // Put matches into their own variables
        list($version, $parameters) = array_slice($match, 1);

        // Split comma-separated parameters
        $parameters = explode(',', $parameters);

        // Set version if available
        if (!empty($version)) {
            $this->setVersion($version);
        }

        // Set parameters if available
        if (!empty($parameters)) {
            $this->setParameters($parameters);
        }

        // Mark parsing as successful
        $this->successful = true;
    }
protected function parse ( ) { // Parse Nodes user agent if ( ! preg_match ( '|Nodes/(.*)\s\((.*)\)|s' , $ this -> userAgent , $ match ) ) { return ; } // Put matches into their own variables list ( $ version , $ parameters ) = array_slice ( $ match , 1 ) ; // Split comma-separated parameters $ parameters = explode ( ',' , $ parameters ) ; // Set version if available if ( ! empty ( $ version ) ) { $ this -> setVersion ( $ version ) ; } // Set parameters if available if ( ! empty ( $ parameters ) ) { $ this -> setParameters ( $ parameters ) ; } // Mark parsing as successful $ this -> successful = true ; }
Parse user agent string.

@author Morten Rugaard <moru@nodes.dk>

@return void
Parse user agent string .