Пример #1
0
 /**
  * Will set the module_opt_pretty variable (array) as a parameter of the server
  * @param \Rest\Server $server
  * @return \Rest\Server
  */
 function execute(\Rest\Server $server)
 {
     //  get the request URL parameters and find the opt_pretty array
     $pretty = $server->getRequest()->getGet("opt_pretty");
     if (isset($pretty)) {
         $server->setParameter(self::MODULE_OPT_PRETTY, true);
     }
     return $server;
 }
Пример #2
0
 /**
  * Will set the module_opt_extended variable (array) as a parameter of the server
  * @param \Rest\Server $server
  * @return \Rest\Server
  */
 function execute(\Rest\Server $server)
 {
     //  get the request URL parameters and find the opt_extended array
     $fields = $server->getRequest()->getGet("opt_fields");
     if (!empty($fields)) {
         $options = $this->__explodePath($fields, ",");
         $server->setParameter(self::MODULE_OPT_FIELDS, $options);
     }
     return $server;
 }