/** * Inserts the default hostname in the request uri if not already set and * calls the parent request() method. * * @param Model $model The model object that operation is performed on, * @return mixed The response from the parent datasource request() */ public function request(&$model) { if (!isset($model->request['uri']['host'])) { $model->request['uri']['host'] = 'gdata.youtube.com'; } $response = parent::request($model); return $response; }
/** * Inserts the default hostname and scheme in the request uri if not already * set and then calls the parent request() method * * @param Model $model The model object that operation is performed on, * @return mixed The response from the parent datasource request() */ public function request(&$model) { if (!isset($model->request['uri']['host'])) { $model->request['uri']['host'] = 'docs.google.com'; } if (!isset($model->request['uri']['scheme'])) { $model->request['uri']['scheme'] = 'https'; } $response = parent::request($model); return $response; }
/** * Inserts the default hostname and scheme in the request uri if not already * set and prefixes the path of the URI then calls the parent request() method * * @param Model $model The model object that operation is performed on, * @return mixed The response from the parent datasource request() */ public function request(&$model) { if (!isset($model->request['uri']['host'])) { $model->request['uri']['host'] = 'www.google.com'; } if (!isset($model->request['uri']['scheme'])) { $model->request['uri']['scheme'] = 'https'; } $model->request['uri']['path'] = 'analytics/feeds/' . $model->request['uri']['path']; $response = parent::request($model); return $response; }