/** * Retrieve a array of getForms * * @return array of \Form */ public function getForms() { list($this->last_result, $this->last_error) = $this->rest_client->get($this->path); $this->erreur = $this->getError($this->last_result, $this->last_error); if (isset($this->erreur)) { return null; } if (isset($this->last_result['records'][0]) && !Form::isJsonValid($this->last_result['records'][0])) { $this->erreur = $this->jsonErrorMessage(); return null; } // parse result in array of object foreach ($this->last_result['records'] as $record) { $this->list_forms[] = new \Form($record); } return $this->list_forms; }