- Modified FHC_Model contructor to get UID from vilesci authentication

- Copied functionalities from old libraries to controllers
- Ported old libraries to CI
- Modified codeception
This commit is contained in:
paolo
2016-06-03 16:19:06 +02:00
parent efe7355a4d
commit dabcf8188b
16 changed files with 697 additions and 202 deletions
@@ -28,6 +28,22 @@ class Nation extends APIv1_Controller
$this->NationModel->setUID($this->_getUID());
}
public function getNation()
{
$nation_code = $this->get("nation_code");
if (isset($nation_code))
{
$result = $this->NationModel->loadWhere(array('nation_code' => $nation_code));
$this->response($result, REST_Controller::HTTP_OK);
}
else
{
$this->response();
}
}
public function getAll()
{
if (!$this->get('orderEnglish'))
@@ -46,6 +46,26 @@ class Orgform extends APIv1_Controller
$this->response();
}
}
/**
* @return void
*/
public function getAll()
{
$result = $this->OrgformModel->loadWhole();
$this->response($result, REST_Controller::HTTP_OK);
}
/**
* @return void
*/
public function getOrgformLV()
{
$result = $this->OrgformModel->getOrgformLV();
$this->response($result, REST_Controller::HTTP_OK);
}
/**
* @return void
@@ -71,13 +91,6 @@ class Orgform extends APIv1_Controller
}
}
public function getAll()
{
$result = $this->OrgformModel->loadWhole();
$this->response($result, REST_Controller::HTTP_OK);
}
private function _validate($orgform = NULL)
{
return true;