src/POData/BaseService.php
/**
     * This method will query and validates for IMetadataProvider and IQueryProvider implementations, invokes
     * BaseService::Initialize to initialize service specific policies.
     *
     * 
     * @throws ODataException
     */
This method will query and validates for IMetadataProvider and IQueryProvider implementations, invokes
BaseService::Initialize to initialize service specific policies.


This method will query and validates for IMetadataProvider and IQueryProvider implementations invokes BaseService :: Initialize to initialize service specific policies .
protected function createProviders()
    { 
        $metadataProvider = $this->getMetadataProvider();
        if (is_null($metadataProvider)) {
            throw ODataException::createInternalServerError(Messages::providersWrapperNull());
        }
        if (!is_object($metadataProvider) || !$metadataProvider instanceof IMetadataProvider) {
            throw ODataException::createInternalServerError(Messages::invalidMetadataInstance());
        }
        $queryProvider = $this->getQueryProvider();
        if (is_null($queryProvider)) {
            throw ODataException::createInternalServerError(Messages::providersWrapperNull());
        }
        if (!is_object($queryProvider)) {
            throw ODataException::createInternalServerError(Messages::invalidQueryInstance());
        }
        if (!$queryProvider instanceof IQueryProvider) {
            throw ODataException::createInternalServerError(Messages::invalidQueryInstance());
        }
        $this->config = new ServiceConfiguration($metadataProvider);
        $this->providersWrapper = new ProvidersWrapper(
            $metadataProvider, 
            $queryProvider, 
            $this->config
        );
        $this->initialize($this->config);
	    $this->writerRegistry = new ODataWriterRegistry();
	    $this->registerWriters();
    }
protected function createProviders ( ) { $ metadataProvider = $ this -> getMetadataProvider ( ) ; if ( is_null ( $ metadataProvider ) ) { throw ODataException :: createInternalServerError ( Messages :: providersWrapperNull ( ) ) ; } if ( ! is_object ( $ metadataProvider ) || ! $ metadataProvider instanceof IMetadataProvider ) { throw ODataException :: createInternalServerError ( Messages :: invalidMetadataInstance ( ) ) ; } $ queryProvider = $ this -> getQueryProvider ( ) ; if ( is_null ( $ queryProvider ) ) { throw ODataException :: createInternalServerError ( Messages :: providersWrapperNull ( ) ) ; } if ( ! is_object ( $ queryProvider ) ) { throw ODataException :: createInternalServerError ( Messages :: invalidQueryInstance ( ) ) ; } if ( ! $ queryProvider instanceof IQueryProvider ) { throw ODataException :: createInternalServerError ( Messages :: invalidQueryInstance ( ) ) ; } $ this -> config = new ServiceConfiguration ( $ metadataProvider ) ; $ this -> providersWrapper = new ProvidersWrapper ( $ metadataProvider , $ queryProvider , $ this -> config ) ; $ this -> initialize ( $ this -> config ) ; $ this -> writerRegistry = new ODataWriterRegistry ( ) ; $ this -> registerWriters ( ) ; }
This method will query and validates for IMetadataProvider and IQueryProvider implementations, invokes
 BaseService::Initialize to initialize service specific policies.
This method will query and validates for IMetadataProvider and IQueryProvider implementations invokes BaseService :: Initialize to initialize service specific policies .
//TODO: this seems like a bad spot to do this