src/Support/UserAgent/Agents/Nodes.php
public function setVersion($version)
    {
        // Set version
        $this->version = $version;

        // Split version into major, minor and patch
        $version = explode('.', $version);
        if (count($version) == 1) {
            array_push($version, 0, 0);
        }

        // Set major, minor and patch version
        $this->majorVersion = (int) isset($version[0]) ? $version[0] : 0;
        $this->minorVersion = (int) isset($version[1]) ? $version[1] : 0;
        $this->patchVersion = (int) isset($version[2]) ? $version[2] : 0;

        return $this;
    }
public function setVersion($version)
    {
        // Set version
        $this->version = $version;

        // Split version into major, minor and patch
        $version = explode('.', $version);
        if (count($version) == 1) {
            array_push($version, 0, 0);
        }

        // Set major, minor and patch version
        $this->majorVersion = (int) isset($version[0]) ? $version[0] : 0;
        $this->minorVersion = (int) isset($version[1]) ? $version[1] : 0;
        $this->patchVersion = (int) isset($version[2]) ? $version[2] : 0;

        return $this;
    }
public function setVersion ( $ version ) { // Set version $ this -> version = $ version ; // Split version into major, minor and patch $ version = explode ( '.' , $ version ) ; if ( count ( $ version ) == 1 ) { array_push ( $ version , 0 , 0 ) ; } // Set major, minor and patch version $ this -> majorVersion = ( int ) isset ( $ version [ 0 ] ) ? $ version [ 0 ] : 0 ; $ this -> minorVersion = ( int ) isset ( $ version [ 1 ] ) ? $ version [ 1 ] : 0 ; $ this -> patchVersion = ( int ) isset ( $ version [ 2 ] ) ? $ version [ 2 ] : 0 ; return $ this ; }
Set version.

@author Morten Rugaard <moru@nodes.dk>

@param string $version

@return $this
Set version .