private function telefone() { if ($this->get_request_method() !== 'GET') { $this->response('', API::STATUS_NOT_ACCEPTABLE); } $idTelefone = (int) $this->_request['id']; if ($idTelefone > 0) { $objeto = DBJson::getTelefoneByID($idTelefone); if (!empty($objeto)) { $this->response($this->json($objeto), API::STATUS_OK); } } $this->response('', API::STATUS_NO_CONTENT); }