[OPT] The UE code * * @return ues The UE(s) data * ---------------------------------------------------------*/ public static function get($args){ $code = null; extract($args); /* Get the ue repo */ /** @var ue $ue_repo */ $ue_repo = Repo::getRepo('ue'); /* (1) Get All ues or 1 by its code (if set) */ $fetched = $ue_repo->get($code); /* (3) Return data */ return ['ues' => $fetched]; } /* (3) Deletes an existing UE * * @code The UE code * * @return deleted Whether it has been removed * ---------------------------------------------------------*/ public static function delete($args){ $code = ''; extract($args); /* Get the ue repo */ /** @var ue $ue_repo */ $ue_repo = Repo::getRepo('ue'); /* (1) Try to delete */ return ['deleted' => $ue_repo->delete($code)]; } }