private function contatos() { if ($this->get_request_method() !== 'GET') { $this->response('', API::STATUS_NOT_ACCEPTABLE); } $objetos = DBJson::searchContatos(); if (!empty($objetos)) { $this->response($this->json($objetos), API::STATUS_OK); } $this->response('', API::STATUS_NO_CONTENT); }