src/DataService/DataService.php
public static function Configure($settings)
    {
        if (isset($settings)) {
            if (is_array($settings)) {
                $ServiceContext = ServiceContext::ConfigureFromPassedArray($settings);
                if (!isset($ServiceContext)) {
                    throw new SdkException('Construct ServiceContext from OAuthSettigs failed.');
                }
                $DataServiceInstance = new DataService($ServiceContext);

            } elseif (is_string($settings)) {
                $ServiceContext = ServiceContext::ConfigureFromLocalFile($settings);
                if (!isset($ServiceContext)) {
                    throw new SdkException('Construct ServiceContext from File failed.');
                }
                $DataServiceInstance = new DataService($ServiceContext);

            }

            if($ServiceContext->IppConfiguration->OAuthMode == CoreConstants::OAUTH2)
            {
                $oauth2Config = $ServiceContext->IppConfiguration->Security;
                if($oauth2Config instanceof OAuth2AccessToken){
                    $DataServiceInstance->configureOAuth2LoginHelper($oauth2Config, $settings);
                }else{
                    throw new SdkException("SDK Error. OAuth mode is not OAuth 2.");
                }
            }

            return $DataServiceInstance;

        } else {
            throw new SdkException("Passed Null to Configure method. It expects either a file path for the config file or an array containing OAuth settings and BaseURL.");
        }
    }
public static function Configure($settings)
    {
        if (isset($settings)) {
            if (is_array($settings)) {
                $ServiceContext = ServiceContext::ConfigureFromPassedArray($settings);
                if (!isset($ServiceContext)) {
                    throw new SdkException('Construct ServiceContext from OAuthSettigs failed.');
                }
                $DataServiceInstance = new DataService($ServiceContext);

            } elseif (is_string($settings)) {
                $ServiceContext = ServiceContext::ConfigureFromLocalFile($settings);
                if (!isset($ServiceContext)) {
                    throw new SdkException('Construct ServiceContext from File failed.');
                }
                $DataServiceInstance = new DataService($ServiceContext);

            }

            if($ServiceContext->IppConfiguration->OAuthMode == CoreConstants::OAUTH2)
            {
                $oauth2Config = $ServiceContext->IppConfiguration->Security;
                if($oauth2Config instanceof OAuth2AccessToken){
                    $DataServiceInstance->configureOAuth2LoginHelper($oauth2Config, $settings);
                }else{
                    throw new SdkException("SDK Error. OAuth mode is not OAuth 2.");
                }
            }

            return $DataServiceInstance;

        } else {
            throw new SdkException("Passed Null to Configure method. It expects either a file path for the config file or an array containing OAuth settings and BaseURL.");
        }
    }
New Static function for static Reading from Config or Passing Array
The config needs to include

@param $settings
@return DataService
@throws SdkException
@throws SdkException