public static function newResources($credentials)
    {
        if ((!isset($credentials[self::USERNAME])) || (!isset($credentials[self::PASSWORD]))) {
            throw new Exception('Invalid credentials');
        }
        $restClient = new Client($credentials[self::USERNAME], $credentials[self::PASSWORD]);
        return new Resources($restClient);
    }
public static function newResources($credentials)
    {
        if ((!isset($credentials[self::USERNAME])) || (!isset($credentials[self::PASSWORD]))) {
            throw new Exception('Invalid credentials');
        }
        $restClient = new Client($credentials[self::USERNAME], $credentials[self::PASSWORD]);
        return new Resources($restClient);
    }
public static function newResources ( $ credentials ) { if ( ( ! isset ( $ credentials [ self :: USERNAME ] ) ) || ( ! isset ( $ credentials [ self :: PASSWORD ] ) ) ) { throw new Exception ( 'Invalid credentials' ) ; } $ restClient = new Client ( $ credentials [ self :: USERNAME ] , $ credentials [ self :: PASSWORD ] ) ; return new Resources ( $ restClient ) ; }
Creates a new Resources object

Creates a new Rest Client based on the credentials
and returns a new Resources instance based on that Rest Client instance.

@param array $credentials
@return IResources
@throws Exception
Creates a new Resources object