public function setApiVersion($apiVersion)
    {
        if (!in_array($apiVersion = intval($apiVersion), $this->getSupportedApiVersions())) {
            throw new UnsupportedApiVersionException();
        }

        $this->apiVersion = $apiVersion;
    }
public function setApiVersion($apiVersion)
    {
        if (!in_array($apiVersion = intval($apiVersion), $this->getSupportedApiVersions())) {
            throw new UnsupportedApiVersionException();
        }

        $this->apiVersion = $apiVersion;
    }
public function setApiVersion ( $ apiVersion ) { if ( ! in_array ( $ apiVersion = intval ( $ apiVersion ) , $ this -> getSupportedApiVersions ( ) ) ) { throw new UnsupportedApiVersionException ( ) ; } $ this -> apiVersion = $ apiVersion ; }
Set API version

@param string|int $apiVersion
@throws UnsupportedApiVersionException
Set API version