/**
  * This method is called only once to initialize service-wide policies
  * 
  * @param DataServiceConfiguration &$config Data service configuration object
  * 
  * @return void
  */
 public function initializeService(DataServiceConfiguration &$config)
 {
     $config->setEntitySetPageSize('*', 10);
     $config->setEntitySetAccessRule('*', EntitySetRights::ALL);
     $config->setAcceptCountRequests(true);
     $config->setAcceptProjectionRequests(true);
     $config->setMaxDataServiceVersion(DataServiceProtocolVersion::V3);
 }
Ejemplo n.º 2
0
 /**
  * This method is called only once to initialize service-wide policies
  * 
  * @param DataServiceConfiguration $config
  */
 public function initializeService(DataServiceConfiguration &$config)
 {
     $config->setEntitySetPageSize('*', 5);
     $config->setEntitySetAccessRule('*', EntitySetRights::ALL);
     $config->setAcceptCountRequests(true);
     //Disable projection request for testing purpose
     $config->setAcceptProjectionRequests(false);
     $config->setMaxDataServiceVersion(DataServiceProtocolVersion::V3);
 }
Ejemplo n.º 3
0
 /**
  * This method is called only once to initialize service-wide policies
  * 
  * @param DataServiceConfiguration $config
  */
 public function initializeService(DataServiceConfiguration &$config)
 {
     $config->setEntitySetAccessRule('*', EntitySetRights::ALL);
     //we are using V1 protocol, but still we set page size because with
     //a top value which is less than pagesize we can use V1 protocol
     //even though paging is enabled.
     $config->setEntitySetPageSize('*', 5);
     $config->setAcceptCountRequests(true);
     $config->setAcceptProjectionRequests(true);
     $config->setMaxDataServiceVersion(DataServiceProtocolVersion::V1);
 }