/**
  * Appends the necessary Custom Authentication credentials for making this authorized call
  * @param HttpRequest $request The out going request to access the resource
  */
 public static function appendCustomAuthParams($request)
 {
     $arrHeaders = $request->__get('headers');
     $arrAuthHeader = array("X-Auth-Token" => Configuration::$APITOKEN);
     $arrHeaders = array_merge($arrHeaders, $arrAuthHeader);
     $request->__set('headers', $arrHeaders);
 }
Example #2
0
 /**
  * Implement a virtual 'headers', 'query' and 'data class property to return their respective objects.
  *
  * @param   string $name  The property name.
  * @return  string $value The property value.
  */
 public function __get($name)
 {
     if ($name == 'headers') {
         return $this->getHeaders();
     }
     if ($name == 'query') {
         return $this->getQuery();
     }
     if ($name == 'data') {
         return $this->getData();
     }
     return parent::__get($name);
 }