src/xAC.php
public static function setApiVersion($version)
    {
        if (! in_array($version, [1,2])) {
            throw new \Exception(sprintf("The %d version is not supported", $version));
        }
        self::$apiVersion = $version;
        
        // Refresh services if version is changed and base url is defined
        if (self::$url) {
            self::initServices();
        }
    }
public static function setApiVersion($version)
    {
        if (! in_array($version, [1,2])) {
            throw new \Exception(sprintf("The %d version is not supported", $version));
        }
        self::$apiVersion = $version;
        
        // Refresh services if version is changed and base url is defined
        if (self::$url) {
            self::initServices();
        }
    }
public static function setApiVersion ( $ version ) { if ( ! in_array ( $ version , [ 1 , 2 ] ) ) { throw new \ Exception ( sprintf ( "The %d version is not supported" , $ version ) ) ; } self :: $ apiVersion = $ version ; // Refresh services if version is changed and base url is defined if ( self :: $ url ) { self :: initServices ( ) ; } }
Define which API version to use
@param integer $version
Define which API version to use