diff options
Diffstat (limited to 'server/core/Identity.php')
| -rwxr-xr-x | server/core/Identity.php | 1637 |
1 files changed, 722 insertions, 915 deletions
diff --git a/server/core/Identity.php b/server/core/Identity.php index 7100c9f..112c9e3 100755 --- a/server/core/Identity.php +++ b/server/core/Identity.php @@ -2,21 +2,24 @@ /** * File containing the identity Class. * -* @version 1.0 Initialisation of this file -* @since 1.0 Core application's file -* -* @author Eole 'eoledev at outlook . fr' -* -* @todo Complete the functions and finish the descriptions +*/ + +/** +* Import the Error of the Library */ use OpenCloud\Common\Error; - + +include("CoreInterface.php"); /** * Identity Class of the back-end application * -* This class allow the communication between the front-end application and -* the library which allow to send requests to an Openstack instance. +* This class implements the management for the identity request * +* @version 1.0 Initialisation of this file +* @since 1.0 Core application's file +* +* @author Eole 'eoledev at outlook . fr' +* */ class identity implements Core{ @@ -31,9 +34,7 @@ class identity implements Core{ * * @param App $app the main app object * - * @throws [Type] [<description>] - * - * @return identity + * @return identity Object */ public function __construct($app){ @@ -51,7 +52,7 @@ class identity implements Core{ */ public function action($action){ - $this->{$action.""}(); + $this->{$action.""}(); } /** @@ -87,14 +88,16 @@ class identity implements Core{ //TODO parse answer }catch(BadResponseError $e){ - $this->app->getErrorInstance->BadResponseHandler($e); - }catch(UserInputError $e){ - $this->app->getErrorInstance->UserInputHandler($e); - }catch(BaseError $e){ - $this->app->getErrorInstance->BaseErrorHandler($e); - }catch(NotImplementedError $e){ - $this->app->getErrorInstance->NotImplementedHandler($e); - } + $this->app->getErrorInstance()->BadResponseHandler($e); + }catch(UserInputError $e){ + $this->app->getErrorInstance()->UserInputHandler($e); + }catch(BaseError $e){ + $this->app->getErrorInstance()->BaseErrorHandler($e); + }catch(NotImplementedError $e){ + $this->app->getErrorInstance()->NotImplementedHandler($e); + }catch(Exception $e){ + $this->app->getErrorInstance()->OtherException($e); + } } @@ -111,14 +114,16 @@ class identity implements Core{ //TODO parse answer }catch(BadResponseError $e){ - $this->app->getErrorInstance->BadResponseHandler($e); - }catch(UserInputError $e){ - $this->app->getErrorInstance->UserInputHandler($e); - }catch(BaseError $e){ - $this->app->getErrorInstance->BaseErrorHandler($e); - }catch(NotImplementedError $e){ - $this->app->getErrorInstance->NotImplementedHandler($e); - } + $this->app->getErrorInstance()->BadResponseHandler($e); + }catch(UserInputError $e){ + $this->app->getErrorInstance()->UserInputHandler($e); + }catch(BaseError $e){ + $this->app->getErrorInstance()->BaseErrorHandler($e); + }catch(NotImplementedError $e){ + $this->app->getErrorInstance()->NotImplementedHandler($e); + }catch(Exception $e){ + $this->app->getErrorInstance()->OtherException($e); + } } @@ -144,14 +149,16 @@ class identity implements Core{ //TODO parse answer }catch(BadResponseError $e){ - $this->app->getErrorInstance->BadResponseHandler($e); - }catch(UserInputError $e){ - $this->app->getErrorInstance->UserInputHandler($e); - }catch(BaseError $e){ - $this->app->getErrorInstance->BaseErrorHandler($e); - }catch(NotImplementedError $e){ - $this->app->getErrorInstance->NotImplementedHandler($e); - } + $this->app->getErrorInstance()->BadResponseHandler($e); + }catch(UserInputError $e){ + $this->app->getErrorInstance()->UserInputHandler($e); + }catch(BaseError $e){ + $this->app->getErrorInstance()->BaseErrorHandler($e); + }catch(NotImplementedError $e){ + $this->app->getErrorInstance()->NotImplementedHandler($e); + }catch(Exception $e){ + $this->app->getErrorInstance()->OtherException($e); + } } @@ -187,14 +194,16 @@ class identity implements Core{ //TODO parse answer }catch(BadResponseError $e){ - $this->app->getErrorInstance->BadResponseHandler($e); - }catch(UserInputError $e){ - $this->app->getErrorInstance->UserInputHandler($e); - }catch(BaseError $e){ - $this->app->getErrorInstance->BaseErrorHandler($e); - }catch(NotImplementedError $e){ - $this->app->getErrorInstance->NotImplementedHandler($e); - } + $this->app->getErrorInstance()->BadResponseHandler($e); + }catch(UserInputError $e){ + $this->app->getErrorInstance()->UserInputHandler($e); + }catch(BaseError $e){ + $this->app->getErrorInstance()->BaseErrorHandler($e); + }catch(NotImplementedError $e){ + $this->app->getErrorInstance()->NotImplementedHandler($e); + }catch(Exception $e){ + $this->app->getErrorInstance()->OtherException($e); + } } /** @@ -220,14 +229,17 @@ class identity implements Core{ //TODO parse answer }catch(BadResponseError $e){ - $this->app->getErrorInstance->BadResponseHandler($e); - }catch(UserInputError $e){ - $this->app->getErrorInstance->UserInputHandler($e); - }catch(BaseError $e){ - $this->app->getErrorInstance->BaseErrorHandler($e); - }catch(NotImplementedError $e){ - $this->app->getErrorInstance->NotImplementedHandler($e); - } + $this->app->getErrorInstance()->BadResponseHandler($e); + }catch(UserInputError $e){ + $this->app->getErrorInstance()->UserInputHandler($e); + }catch(BaseError $e){ + $this->app->getErrorInstance()->BaseErrorHandler($e); + }catch(NotImplementedError $e){ + $this->app->getErrorInstance()->NotImplementedHandler($e); + }catch(Exception $e){ + $this->app->getErrorInstance()->OtherException($e); + } + }- /** @@ -251,13 +263,13 @@ class identity implements Core{ } if(isset($enabled) && isset($description)) - $opt = array('description' => $description, 'enabled' => $enabled, 'name' => $name); + $opt = array('description' => $description, 'enabled' => $enabled, 'name' => $name); elseif(isset($enabled)) - $opt = array('enabled' => $enabled, 'name' => $name); + $opt = array('enabled' => $enabled, 'name' => $name); elseif(isset($description)) - $opt = array('description' => $description, 'name' => $name); + $opt = array('description' => $description, 'name' => $name); else - $opt = array('name' => $name); + $opt = array('name' => $name); try{ @@ -266,14 +278,16 @@ class identity implements Core{ //TODO parse answer }catch(BadResponseError $e){ - $this->app->getErrorInstance->BadResponseHandler($e); - }catch(UserInputError $e){ - $this->app->getErrorInstance->UserInputHandler($e); - }catch(BaseError $e){ - $this->app->getErrorInstance->BaseErrorHandler($e); - }catch(NotImplementedError $e){ - $this->app->getErrorInstance->NotImplementedHandler($e); - } + $this->app->getErrorInstance()->BadResponseHandler($e); + }catch(UserInputError $e){ + $this->app->getErrorInstance()->UserInputHandler($e); + }catch(BaseError $e){ + $this->app->getErrorInstance()->BaseErrorHandler($e); + }catch(NotImplementedError $e){ + $this->app->getErrorInstance()->NotImplementedHandler($e); + }catch(Exception $e){ + $this->app->getErrorInstance()->OtherException($e); + } } @@ -291,14 +305,16 @@ class identity implements Core{ //TODO parse answer }catch(BadResponseError $e){ - $this->app->getErrorInstance->BadResponseHandler($e); - }catch(UserInputError $e){ - $this->app->getErrorInstance->UserInputHandler($e); - }catch(BaseError $e){ - $this->app->getErrorInstance->BaseErrorHandler($e); - }catch(NotImplementedError $e){ - $this->app->getErrorInstance->NotImplementedHandler($e); - } + $this->app->getErrorInstance()->BadResponseHandler($e); + }catch(UserInputError $e){ + $this->app->getErrorInstance()->UserInputHandler($e); + }catch(BaseError $e){ + $this->app->getErrorInstance()->BaseErrorHandler($e); + }catch(NotImplementedError $e){ + $this->app->getErrorInstance()->NotImplementedHandler($e); + }catch(Exception $e){ + $this->app->getErrorInstance()->OtherException($e); + } } @@ -325,14 +341,16 @@ class identity implements Core{ //TODO parse answer }catch(BadResponseError $e){ - $this->app->getErrorInstance->BadResponseHandler($e); - }catch(UserInputError $e){ - $this->app->getErrorInstance->UserInputHandler($e); - }catch(BaseError $e){ - $this->app->getErrorInstance->BaseErrorHandler($e); - }catch(NotImplementedError $e){ - $this->app->getErrorInstance->NotImplementedHandler($e); - } + $this->app->getErrorInstance()->BadResponseHandler($e); + }catch(UserInputError $e){ + $this->app->getErrorInstance()->UserInputHandler($e); + }catch(BaseError $e){ + $this->app->getErrorInstance()->BaseErrorHandler($e); + }catch(NotImplementedError $e){ + $this->app->getErrorInstance()->NotImplementedHandler($e); + }catch(Exception $e){ + $this->app->getErrorInstance()->OtherException($e); + } } /** @@ -357,31 +375,33 @@ class identity implements Core{ return; } - + try{ $domain = $this->libClass->getDomain($domId); if(isset($name)) - $domain->name = $name; + $domain->name = $name; if(isset($enabled)) - $domain->enabled = $enabled; + $domain->enabled = $enabled; if(isset($description)) - $domain->description = $description; + $domain->description = $description; $domain->update(); //TODO parse answer }catch(BadResponseError $e){ - $this->app->getErrorInstance->BadResponseHandler($e); - }catch(UserInputError $e){ - $this->app->getErrorInstance->UserInputHandler($e); - }catch(BaseError $e){ - $this->app->getErrorInstance->BaseErrorHandler($e); - }catch(NotImplementedError $e){ - $this->app->getErrorInstance->NotImplementedHandler($e); - } + $this->app->getErrorInstance()->BadResponseHandler($e); + }catch(UserInputError $e){ + $this->app->getErrorInstance()->UserInputHandler($e); + }catch(BaseError $e){ + $this->app->getErrorInstance()->BaseErrorHandler($e); + }catch(NotImplementedError $e){ + $this->app->getErrorInstance()->NotImplementedHandler($e); + }catch(Exception $e){ + $this->app->getErrorInstance()->OtherException($e); + } } /** @@ -407,21 +427,21 @@ class identity implements Core{ //TODO parse answer }catch(BadResponseError $e){ - $this->app->getErrorInstance->BadResponseHandler($e); - }catch(UserInputError $e){ - $this->app->getErrorInstance->UserInputHandler($e); - }catch(BaseError $e){ - $this->app->getErrorInstance->BaseErrorHandler($e); - }catch(NotImplementedError $e){ - $this->app->getErrorInstance->NotImplementedHandler($e); - } + $this->app->getErrorInstance()->BadResponseHandler($e); + }catch(UserInputError $e){ + $this->app->getErrorInstance()->UserInputHandler($e); + }catch(BaseError $e){ + $this->app->getErrorInstance()->BaseErrorHandler($e); + }catch(NotImplementedError $e){ + $this->app->getErrorInstance()->NotImplementedHandler($e); + }catch(Exception $e){ + $this->app->getErrorInstance()->OtherException($e); + } } /** * Retrieve the different roles of a given user in a domain. * - * @throws [Type] [<description>] - * * @return void */ private function listRolesDomainUser(){ @@ -442,21 +462,21 @@ class identity implements Core{ //TODO parse answer }catch(BadResponseError $e){ - $this->app->getErrorInstance->BadResponseHandler($e); - }catch(UserInputError $e){ - $this->app->getErrorInstance->UserInputHandler($e); - }catch(BaseError $e){ - $this->app->getErrorInstance->BaseErrorHandler($e); - }catch(NotImplementedError $e){ - $this->app->getErrorInstance->NotImplementedHandler($e); - } + $this->app->getErrorInstance()->BadResponseHandler($e); + }catch(UserInputError $e){ + $this->app->getErrorInstance()->UserInputHandler($e); + }catch(BaseError $e){ + $this->app->getErrorInstance()->BaseErrorHandler($e); + }catch(NotImplementedError $e){ + $this->app->getErrorInstance()->NotImplementedHandler($e); + }catch(Exception $e){ + $this->app->getErrorInstance()->OtherException($e); + } } /** * Grant a role to a given user in a domain. * - * @throws [Type] [<description>] - * * @return void */ private function grantRoleDomainUser(){ @@ -473,28 +493,28 @@ class identity implements Core{ $domain = $this->libClass->getDomain($domId); $domain->grantUserRole([ - 'userId' => $userId, - 'roleId' => $roleId, + 'userId' => $userId, + 'roleId' => $roleId, ]); //TODO parse answer }catch(BadResponseError $e){ - $this->app->getErrorInstance->BadResponseHandler($e); - }catch(UserInputError $e){ - $this->app->getErrorInstance->UserInputHandler($e); - }catch(BaseError $e){ - $this->app->getErrorInstance->BaseErrorHandler($e); - }catch(NotImplementedError $e){ - $this->app->getErrorInstance->NotImplementedHandler($e); - } + $this->app->getErrorInstance()->BadResponseHandler($e); + }catch(UserInputError $e){ + $this->app->getErrorInstance()->UserInputHandler($e); + }catch(BaseError $e){ + $this->app->getErrorInstance()->BaseErrorHandler($e); + }catch(NotImplementedError $e){ + $this->app->getErrorInstance()->NotImplementedHandler($e); + }catch(Exception $e){ + $this->app->getErrorInstance()->OtherException($e); + } } /** * Verify that a user has a given role in a domain. * - * @throws [Type] [<description>] - * * @return void */ private function checkRoleDomainUser(){ @@ -519,21 +539,21 @@ class identity implements Core{ //TODO parse answer }catch(BadResponseError $e){ - $this->app->getErrorInstance->BadResponseHandler($e); - }catch(UserInputError $e){ - $this->app->getErrorInstance->UserInputHandler($e); - }catch(BaseError $e){ - $this->app->getErrorInstance->BaseErrorHandler($e); - }catch(NotImplementedError $e){ - $this->app->getErrorInstance->NotImplementedHandler($e); - } + $this->app->getErrorInstance()->BadResponseHandler($e); + }catch(UserInputError $e){ + $this->app->getErrorInstance()->UserInputHandler($e); + }catch(BaseError $e){ + $this->app->getErrorInstance()->BaseErrorHandler($e); + }catch(NotImplementedError $e){ + $this->app->getErrorInstance()->NotImplementedHandler($e); + }catch(Exception $e){ + $this->app->getErrorInstance()->OtherException($e); + } } /** * Delete a role for a given user in a domain. * - * @throws [Type] [<description>] - * * @return void */ private function revokeRoleDomainUser(){ @@ -550,28 +570,28 @@ class identity implements Core{ $domain = $this->libClass->getDomain($domId); $domain->revokeUserRole([ - 'userId' => $userId, - 'roleId' => $roleId, + 'userId' => $userId, + 'roleId' => $roleId, ]); //TODO parse answer }catch(BadResponseError $e){ - $this->app->getErrorInstance->BadResponseHandler($e); - }catch(UserInputError $e){ - $this->app->getErrorInstance->UserInputHandler($e); - }catch(BaseError $e){ - $this->app->getErrorInstance->BaseErrorHandler($e); - }catch(NotImplementedError $e){ - $this->app->getErrorInstance->NotImplementedHandler($e); - } + $this->app->getErrorInstance()->BadResponseHandler($e); + }catch(UserInputError $e){ + $this->app->getErrorInstance()->UserInputHandler($e); + }catch(BaseError $e){ + $this->app->getErrorInstance()->BaseErrorHandler($e); + }catch(NotImplementedError $e){ + $this->app->getErrorInstance()->NotImplementedHandler($e); + }catch(Exception $e){ + $this->app->getErrorInstance()->OtherException($e); + } } /** * Retrieve the roles of a given group in a domain. * - * @throws [Type] [<description>] - * * @return void */ private function listRolesDomainGroup(){ @@ -592,21 +612,21 @@ class identity implements Core{ //TODO parse answer }catch(BadResponseError $e){ - $this->app->getErrorInstance->BadResponseHandler($e); - }catch(UserInputError $e){ - $this->app->getErrorInstance->UserInputHandler($e); - }catch(BaseError $e){ - $this->app->getErrorInstance->BaseErrorHandler($e); - }catch(NotImplementedError $e){ - $this->app->getErrorInstance->NotImplementedHandler($e); - } + $this->app->getErrorInstance()->BadResponseHandler($e); + }catch(UserInputError $e){ + $this->app->getErrorInstance()->UserInputHandler($e); + }catch(BaseError $e){ + $this->app->getErrorInstance()->BaseErrorHandler($e); + }catch(NotImplementedError $e){ + $this->app->getErrorInstance()->NotImplementedHandler($e); + }catch(Exception $e){ + $this->app->getErrorInstance()->OtherException($e); + } } /** * Add a role to a given group in a domain. * - * @throws [Type] [<description>] - * * @return void */ private function grantRoleDomainGroup(){ @@ -623,28 +643,28 @@ class identity implements Core{ $domain = $this->libClass->getDomain($domId); $domain->grantGroupRole([ - 'groupId' => $groupId, - 'roleId' => $roleId, + 'groupId' => $groupId, + 'roleId' => $roleId, ]); //TODO parse answer }catch(BadResponseError $e){ - $this->app->getErrorInstance->BadResponseHandler($e); - }catch(UserInputError $e){ - $this->app->getErrorInstance->UserInputHandler($e); - }catch(BaseError $e){ - $this->app->getErrorInstance->BaseErrorHandler($e); - }catch(NotImplementedError $e){ - $this->app->getErrorInstance->NotImplementedHandler($e); - } + $this->app->getErrorInstance()->BadResponseHandler($e); + }catch(UserInputError $e){ + $this->app->getErrorInstance()->UserInputHandler($e); + }catch(BaseError $e){ + $this->app->getErrorInstance()->BaseErrorHandler($e); + }catch(NotImplementedError $e){ + $this->app->getErrorInstance()->NotImplementedHandler($e); + }catch(Exception $e){ + $this->app->getErrorInstance()->OtherException($e); + } } /** * Verify that a role is associated with a given group in a domain. * - * @throws [Type] [<description>] - * * @return void */ private function checkRoleDomainGroup(){ @@ -669,27 +689,21 @@ class identity implements Core{ //TODO parse answer }catch(BadResponseError $e){ - $this->app->getErrorInstance->BadResponseHandler($e); - }catch(UserInputError $e){ - $this->app->getErrorInstance->UserInputHandler($e); - }catch(BaseError $e){ - $this->app->getErrorInstance->BaseErrorHandler($e); - }catch(NotImplementedError $e){ - $this->app->getErrorInstance->NotImplementedHandler($e); - } + $this->app->getErrorInstance()->BadResponseHandler($e); + }catch(UserInputError $e){ + $this->app->getErrorInstance()->UserInputHandler($e); + }catch(BaseError $e){ + $this->app->getErrorInstance()->BaseErrorHandler($e); + }catch(NotImplementedError $e){ + $this->app->getErrorInstance()->NotImplementedHandler($e); + }catch(Exception $e){ + $this->app->getErrorInstance()->OtherException($e); + } } /** * Delete a role for a given group in a domain. * - * A *description*, that can span multiple lines, to go _in-depth_ into the details of this element - * and to provide some background information or textual references. - * - * @param string $myArgument With a *description* of this argument, these may also - * span multiple lines. - * - * @throws [Type] [<description>] - * * @return void */ private function revokeRoleDomainGroup(){ @@ -706,29 +720,29 @@ class identity implements Core{ $domain = $this->libClass->getDomain($roleId); $domain->revokeGroupRole([ - 'groupId' => $groupId, - 'roleId' => $roleId, + 'groupId' => $groupId, + 'roleId' => $roleId, ]); //TODO parse answer }catch(BadResponseError $e){ - $this->app->getErrorInstance->BadResponseHandler($e); - }catch(UserInputError $e){ - $this->app->getErrorInstance->UserInputHandler($e); - }catch(BaseError $e){ - $this->app->getErrorInstance->BaseErrorHandler($e); - }catch(NotImplementedError $e){ - $this->app->getErrorInstance->NotImplementedHandler($e); - } + $this->app->getErrorInstance()->BadResponseHandler($e); + }catch(UserInputError $e){ + $this->app->getErrorInstance()->UserInputHandler($e); + }catch(BaseError $e){ + $this->app->getErrorInstance()->BaseErrorHandler($e); + }catch(NotImplementedError $e){ + $this->app->getErrorInstance()->NotImplementedHandler($e); + }catch(Exception $e){ + $this->app->getErrorInstance()->OtherException($e); + } } /** * Add an endpoint to the Openstack instance * - * @throws [Type] [<description>] - * * @return void */ private function addEndpoint(){ @@ -744,31 +758,31 @@ class identity implements Core{ try{ $endpoint = $this->libClass->createEndpoint([ - 'interface' => \OpenStack\Identity\v3\Enum::INTERFACE_INTERNAL, - 'name' => $name, - 'region' => $region, - 'url' => $url, - 'serviceId' => $servId + 'interface' => \OpenStack\Identity\v3\Enum::INTERFACE_INTERNAL, + 'name' => $name, + 'region' => $region, + 'url' => $url, + 'serviceId' => $servId ]); //TODO parse answer }catch(BadResponseError $e){ - $this->app->getErrorInstance->BadResponseHandler($e); - }catch(UserInputError $e){ - $this->app->getErrorInstance->UserInputHandler($e); - }catch(BaseError $e){ - $this->app->getErrorInstance->BaseErrorHandler($e); - }catch(NotImplementedError $e){ - $this->app->getErrorInstance->NotImplementedHandler($e); - } + $this->app->getErrorInstance()->BadResponseHandler($e); + }catch(UserInputError $e){ + $this->app->getErrorInstance()->UserInputHandler($e); + }catch(BaseError $e){ + $this->app->getErrorInstance()->BaseErrorHandler($e); + }catch(NotImplementedError $e){ + $this->app->getErrorInstance()->NotImplementedHandler($e); + }catch(Exception $e){ + $this->app->getErrorInstance()->OtherException($e); + } } /** * Retrieve the endpoint for the given id * - * @throws [Type] [<description>] - * * @return void */ private function getEndpoint(){ @@ -786,14 +800,16 @@ class identity implements Core{ //TODO parse answer }catch(BadResponseError $e){ - $this->app->getErrorInstance->BadResponseHandler($e); - }catch(UserInputError $e){ - $this->app->getErrorInstance->UserInputHandler($e); - }catch(BaseError $e){ - $this->app->getErrorInstance->BaseErrorHandler($e); - }catch(NotImplementedError $e){ - $this->app->getErrorInstance->NotImplementedHandler($e); - } + $this->app->getErrorInstance()->BadResponseHandler($e); + }catch(UserInputError $e){ + $this->app->getErrorInstance()->UserInputHandler($e); + }catch(BaseError $e){ + $this->app->getErrorInstance()->BaseErrorHandler($e); + }catch(NotImplementedError $e){ + $this->app->getErrorInstance()->NotImplementedHandler($e); + }catch(Exception $e){ + $this->app->getErrorInstance()->OtherException($e); + } } /** @@ -802,7 +818,7 @@ class identity implements Core{ * @return void */ private function listEndpoints(){ - + try{ $res = $this->libClass->listEndpoints(); @@ -810,60 +826,30 @@ class identity implements Core{ //TODO parse answer }catch(BadResponseError $e){ - $this->app->getErrorInstance->BadResponseHandler($e); - }catch(UserInputError $e){ - $this->app->getErrorInstance->UserInputHandler($e); - }catch(BaseError $e){ - $this->app->getErrorInstance->BaseErrorHandler($e); - }catch(NotImplementedError $e){ - $this->app->getErrorInstance->NotImplementedHandler($e); - } + $this->app->getErrorInstance()->BadResponseHandler($e); + }catch(UserInputError $e){ + $this->app->getErrorInstance()->UserInputHandler($e); + }catch(BaseError $e){ + $this->app->getErrorInstance()->BaseErrorHandler($e); + }catch(NotImplementedError $e){ + $this->app->getErrorInstance()->NotImplementedHandler($e); + }catch(Exception $e){ + $this->app->getErrorInstance()->OtherException($e); + } } /** * Update a given endpoint * - * @throws [Type] [<description>] - * * @return void */ private function updateEndpoint(){ //Not Implemented Yet - - /*$domId = $this->app->getPostParam("domainId"); - $groupId = $this->app->getPostParam("groupId"); - - if(!isset($domId) || !isset($groupId)){ - - } - - //TODO PARAMETERS - try{ - - $endpoint = $this->libClass->getEndpoint('{endpointId}'); - - $endpoint->interface = \OpenStack\Identity\v3\Enum::INTERFACE_PUBLIC; - - $endpoint->update(); - - //TODO parse answer - - }catch(BadResponseError $e){ - $this->app->getErrorInstance->BadResponseHandler($e); - }catch(UserInputError $e){ - $this->app->getErrorInstance->UserInputHandler($e); - }catch(BaseError $e){ - $this->app->getErrorInstance->BaseErrorHandler($e); - }catch(NotImplementedError $e){ - $this->app->getErrorInstance->NotImplementedHandler($e); - }*/ } /** * Delete a given endpoint * - * @throws [Type] [<description>] - * * @return void */ private function deleteEndpoint(){ @@ -881,121 +867,48 @@ class identity implements Core{ //TODO parse answer }catch(BadResponseError $e){ - $this->app->getErrorInstance->BadResponseHandler($e); - }catch(UserInputError $e){ - $this->app->getErrorInstance->UserInputHandler($e); - }catch(BaseError $e){ - $this->app->getErrorInstance->BaseErrorHandler($e); - }catch(NotImplementedError $e){ - $this->app->getErrorInstance->NotImplementedHandler($e); - } + $this->app->getErrorInstance()->BadResponseHandler($e); + }catch(UserInputError $e){ + $this->app->getErrorInstance()->UserInputHandler($e); + }catch(BaseError $e){ + $this->app->getErrorInstance()->BaseErrorHandler($e); + }catch(NotImplementedError $e){ + $this->app->getErrorInstance()->NotImplementedHandler($e); + }catch(Exception $e){ + $this->app->getErrorInstance()->OtherException($e); + } } /** * Add a group. * - * @throws [Type] [<description>] - * * @return void */ private function addGroup(){ //Not Implemented Yet - - /*$domId = $this->app->getPostParam("domainId"); - $groupId = $this->app->getPostParam("groupId"); - - if(!isset($domId) || !isset($groupId)){ - - } - try{ - - $this->libClass->listCredentials() - - //TODO parse answer - - }catch(BadResponseError $e){ - $this->app->getErrorInstance->BadResponseHandler($e); - }catch(UserInputError $e){ - $this->app->getErrorInstance->UserInputHandler($e); - }catch(BaseError $e){ - $this->app->getErrorInstance->BaseErrorHandler($e); - }catch(NotImplementedError $e){ - $this->app->getErrorInstance->NotImplementedHandler($e); - }*/ } /** * Retrieve the group's list. * - * @throws [Type] [<description>] - * * @return void */ private function listGroups(){ //Not Implemented Yet - /* - $domId = $this->app->getPostParam("domainId"); - $groupId = $this->app->getPostParam("groupId"); - - if(!isset($domId) || !isset($groupId)){ - - } - try{ - - $this->libClass->listCredentials() - - //TODO parse answer - - }catch(BadResponseError $e){ - $this->app->getErrorInstance->BadResponseHandler($e); - }catch(UserInputError $e){ - $this->app->getErrorInstance->UserInputHandler($e); - }catch(BaseError $e){ - $this->app->getErrorInstance->BaseErrorHandler($e); - }catch(NotImplementedError $e){ - $this->app->getErrorInstance->NotImplementedHandler($e); - }*/ } /** * Retrieve the details of a given group. * - * @throws [Type] [<description>] - * * @return void */ private function showGroup(){ //Not Implemented Yet - - /* - $domId = $this->app->getPostParam("domainId"); - $groupId = $this->app->getPostParam("groupId"); - - if(!isset($domId) || !isset($groupId)){ - - } - try{ - - $this->libClass->listCredentials() - - //TODO parse answer - - }catch(BadResponseError $e){ - $this->app->getErrorInstance->BadResponseHandler($e); - }catch(UserInputError $e){ - $this->app->getErrorInstance->UserInputHandler($e); - }catch(BaseError $e){ - $this->app->getErrorInstance->BaseErrorHandler($e); - }catch(NotImplementedError $e){ - $this->app->getErrorInstance->NotImplementedHandler($e); - }*/ } /** * Update a given group. * - * @throws [Type] [<description>] - * * @return void */ private function updateGroup(){ @@ -1013,30 +926,30 @@ class identity implements Core{ $group = $this->libClass->getGroup($groupId); if(isset($description)) - $group->description = 'foo'; + $group->description = 'foo'; if(isset($name)) - $group->name = 'bar'; + $group->name = 'bar'; $group->update(); //TODO parse answer }catch(BadResponseError $e){ - $this->app->getErrorInstance->BadResponseHandler($e); - }catch(UserInputError $e){ - $this->app->getErrorInstance->UserInputHandler($e); - }catch(BaseError $e){ - $this->app->getErrorInstance->BaseErrorHandler($e); - }catch(NotImplementedError $e){ - $this->app->getErrorInstance->NotImplementedHandler($e); - } + $this->app->getErrorInstance()->BadResponseHandler($e); + }catch(UserInputError $e){ + $this->app->getErrorInstance()->UserInputHandler($e); + }catch(BaseError $e){ + $this->app->getErrorInstance()->BaseErrorHandler($e); + }catch(NotImplementedError $e){ + $this->app->getErrorInstance()->NotImplementedHandler($e); + }catch(Exception $e){ + $this->app->getErrorInstance()->OtherException($e); + } } /** * Delete the given group. * - * @throws [Type] [<description>] - * * @return void */ private function deleteGroup(){ @@ -1056,21 +969,21 @@ class identity implements Core{ //TODO parse answer }catch(BadResponseError $e){ - $this->app->getErrorInstance->BadResponseHandler($e); - }catch(UserInputError $e){ - $this->app->getErrorInstance->UserInputHandler($e); - }catch(BaseError $e){ - $this->app->getErrorInstance->BaseErrorHandler($e); - }catch(NotImplementedError $e){ - $this->app->getErrorInstance->NotImplementedHandler($e); - } + $this->app->getErrorInstance()->BadResponseHandler($e); + }catch(UserInputError $e){ + $this->app->getErrorInstance()->UserInputHandler($e); + }catch(BaseError $e){ + $this->app->getErrorInstance()->BaseErrorHandler($e); + }catch(NotImplementedError $e){ + $this->app->getErrorInstance()->NotImplementedHandler($e); + }catch(Exception $e){ + $this->app->getErrorInstance()->OtherException($e); + } } /** * Retrieve the users of a given group. * - * @throws [Type] [<description>] - * * @return void */ private function listGroupUsers(){ @@ -1090,21 +1003,21 @@ class identity implements Core{ //TODO parse answer }catch(BadResponseError $e){ - $this->app->getErrorInstance->BadResponseHandler($e); - }catch(UserInputError $e){ - $this->app->getErrorInstance->UserInputHandler($e); - }catch(BaseError $e){ - $this->app->getErrorInstance->BaseErrorHandler($e); - }catch(NotImplementedError $e){ - $this->app->getErrorInstance->NotImplementedHandler($e); - } + $this->app->getErrorInstance()->BadResponseHandler($e); + }catch(UserInputError $e){ + $this->app->getErrorInstance()->UserInputHandler($e); + }catch(BaseError $e){ + $this->app->getErrorInstance()->BaseErrorHandler($e); + }catch(NotImplementedError $e){ + $this->app->getErrorInstance()->NotImplementedHandler($e); + }catch(Exception $e){ + $this->app->getErrorInstance()->OtherException($e); + } } /** * Add a user to a group. * - * @throws [Type] [<description>] - * * @return void */ private function addGroupUser(){ @@ -1125,21 +1038,21 @@ class identity implements Core{ //TODO parse answer }catch(BadResponseError $e){ - $this->app->getErrorInstance->BadResponseHandler($e); - }catch(UserInputError $e){ - $this->app->getErrorInstance->UserInputHandler($e); - }catch(BaseError $e){ - $this->app->getErrorInstance->BaseErrorHandler($e); - }catch(NotImplementedError $e){ - $this->app->getErrorInstance->NotImplementedHandler($e); - } + $this->app->getErrorInstance()->BadResponseHandler($e); + }catch(UserInputError $e){ + $this->app->getErrorInstance()->UserInputHandler($e); + }catch(BaseError $e){ + $this->app->getErrorInstance()->BaseErrorHandler($e); + }catch(NotImplementedError $e){ + $this->app->getErrorInstance()->NotImplementedHandler($e); + }catch(Exception $e){ + $this->app->getErrorInstance()->OtherException($e); + } } /** * Remove a user from a given group. * - * @throws [Type] [<description>] - * * @return void */ private function removeGroupUser(){ @@ -1160,21 +1073,21 @@ class identity implements Core{ //TODO parse answer }catch(BadResponseError $e){ - $this->app->getErrorInstance->BadResponseHandler($e); - }catch(UserInputError $e){ - $this->app->getErrorInstance->UserInputHandler($e); - }catch(BaseError $e){ - $this->app->getErrorInstance->BaseErrorHandler($e); - }catch(NotImplementedError $e){ - $this->app->getErrorInstance->NotImplementedHandler($e); - } + $this->app->getErrorInstance()->BadResponseHandler($e); + }catch(UserInputError $e){ + $this->app->getErrorInstance()->UserInputHandler($e); + }catch(BaseError $e){ + $this->app->getErrorInstance()->BaseErrorHandler($e); + }catch(NotImplementedError $e){ + $this->app->getErrorInstance()->NotImplementedHandler($e); + }catch(Exception $e){ + $this->app->getErrorInstance()->OtherException($e); + } } /** * Check if a group contains a given user. * - * @throws [Type] [<description>] - * * @return void */ private function checkGroupUser(){ @@ -1195,187 +1108,67 @@ class identity implements Core{ //TODO parse answer }catch(BadResponseError $e){ - $this->app->getErrorInstance->BadResponseHandler($e); - }catch(UserInputError $e){ - $this->app->getErrorInstance->UserInputHandler($e); - }catch(BaseError $e){ - $this->app->getErrorInstance->BaseErrorHandler($e); - }catch(NotImplementedError $e){ - $this->app->getErrorInstance->NotImplementedHandler($e); - } + $this->app->getErrorInstance()->BadResponseHandler($e); + }catch(UserInputError $e){ + $this->app->getErrorInstance()->UserInputHandler($e); + }catch(BaseError $e){ + $this->app->getErrorInstance()->BaseErrorHandler($e); + }catch(NotImplementedError $e){ + $this->app->getErrorInstance()->NotImplementedHandler($e); + }catch(Exception $e){ + $this->app->getErrorInstance()->OtherException($e); + } } /** * @todo * - * @throws [Type] [<description>] - * * @return void */ private function addPolicies(){ //Not Implemented Yet - /* - $domId = $this->app->getPostParam("domainId"); - $groupId = $this->app->getPostParam("groupId"); - - if(!isset($domId) || !isset($groupId)){ - - } - try{ - - $this->libClass->listCredentials() - - //TODO parse answer - - }catch(BadResponseError $e){ - $this->app->getErrorInstance->BadResponseHandler($e); - }catch(UserInputError $e){ - $this->app->getErrorInstance->UserInputHandler($e); - }catch(BaseError $e){ - $this->app->getErrorInstance->BaseErrorHandler($e); - }catch(NotImplementedError $e){ - $this->app->getErrorInstance->NotImplementedHandler($e); - }*/ } /** * @todo * - * @throws [Type] [<description>] - * * @return void */ private function listPolicies(){ //Not Implemented Yet - /* - $domId = $this->app->getPostParam("domainId"); - $groupId = $this->app->getPostParam("groupId"); - - if(!isset($domId) || !isset($groupId)){ - - } - try{ - - $this->libClass->listCredentials() - - //TODO parse answer - - }catch(BadResponseError $e){ - $this->app->getErrorInstance->BadResponseHandler($e); - }catch(UserInputError $e){ - $this->app->getErrorInstance->UserInputHandler($e); - }catch(BaseError $e){ - $this->app->getErrorInstance->BaseErrorHandler($e); - }catch(NotImplementedError $e){ - $this->app->getErrorInstance->NotImplementedHandler($e); - }*/ } /** * @todo * - * @throws [Type] [<description>] - * * @return void */ private function showPolicie(){ //Not Implemented Yet - /* - $domId = $this->app->getPostParam("domainId"); - $groupId = $this->app->getPostParam("groupId"); - - if(!isset($domId) || !isset($groupId)){ - - } - try{ - - $this->libClass->listCredentials() - - //TODO parse answer - - }catch(BadResponseError $e){ - $this->app->getErrorInstance->BadResponseHandler($e); - }catch(UserInputError $e){ - $this->app->getErrorInstance->UserInputHandler($e); - }catch(BaseError $e){ - $this->app->getErrorInstance->BaseErrorHandler($e); - }catch(NotImplementedError $e){ - $this->app->getErrorInstance->NotImplementedHandler($e); - }*/ } /** * @todo * - * @throws [Type] [<description>] - * * @return void */ private function updatePolicies(){ //Not Implemented Yet - /* - $domId = $this->app->getPostParam("domainId"); - $groupId = $this->app->getPostParam("groupId"); - - if(!isset($domId) || !isset($groupId)){ - - } - try{ - - $this->libClass->listCredentials() - - //TODO parse answer - - }catch(BadResponseError $e){ - $this->app->getErrorInstance->BadResponseHandler($e); - }catch(UserInputError $e){ - $this->app->getErrorInstance->UserInputHandler($e); - }catch(BaseError $e){ - $this->app->getErrorInstance->BaseErrorHandler($e); - }catch(NotImplementedError $e){ - $this->app->getErrorInstance->NotImplementedHandler($e); - }*/ } /** * @todo * - * @throws [Type] [<description>] - * * @return void */ private function deletePolicies(){ //Not Implemented Yet - /* - $domId = $this->app->getPostParam("domainId"); - $groupId = $this->app->getPostParam("groupId"); - - if(!isset($domId) || !isset($groupId)){ - - } - try{ - - $this->libClass->listCredentials() - - //TODO parse answer - - }catch(BadResponseError $e){ - $this->app->getErrorInstance->BadResponseHandler($e); - }catch(UserInputError $e){ - $this->app->getErrorInstance->UserInputHandler($e); - }catch(BaseError $e){ - $this->app->getErrorInstance->BaseErrorHandler($e); - }catch(NotImplementedError $e){ - $this->app->getErrorInstance->NotImplementedHandler($e); - }*/ } /** * Add a project. * - * @throws [Type] [<description>] - * * @return void */ private function addProject(){ @@ -1390,22 +1183,24 @@ class identity implements Core{ try{ $project = $this->libClass->createProject([ - 'description' => $description, - 'enabled' => true, - 'name' => $name + 'description' => $description, + 'enabled' => true, + 'name' => $name ]); //TODO parse answer }catch(BadResponseError $e){ - $this->app->getErrorInstance->BadResponseHandler($e); - }catch(UserInputError $e){ - $this->app->getErrorInstance->UserInputHandler($e); - }catch(BaseError $e){ - $this->app->getErrorInstance->BaseErrorHandler($e); - }catch(NotImplementedError $e){ - $this->app->getErrorInstance->NotImplementedHandler($e); - } + $this->app->getErrorInstance()->BadResponseHandler($e); + }catch(UserInputError $e){ + $this->app->getErrorInstance()->UserInputHandler($e); + }catch(BaseError $e){ + $this->app->getErrorInstance()->BaseErrorHandler($e); + }catch(NotImplementedError $e){ + $this->app->getErrorInstance()->NotImplementedHandler($e); + }catch(Exception $e){ + $this->app->getErrorInstance()->OtherException($e); + } } /** @@ -1422,21 +1217,21 @@ class identity implements Core{ //TODO parse answer }catch(BadResponseError $e){ - $this->app->getErrorInstance->BadResponseHandler($e); - }catch(UserInputError $e){ - $this->app->getErrorInstance->UserInputHandler($e); - }catch(BaseError $e){ - $this->app->getErrorInstance->BaseErrorHandler($e); - }catch(NotImplementedError $e){ - $this->app->getErrorInstance->NotImplementedHandler($e); - } + $this->app->getErrorInstance()->BadResponseHandler($e); + }catch(UserInputError $e){ + $this->app->getErrorInstance()->UserInputHandler($e); + }catch(BaseError $e){ + $this->app->getErrorInstance()->BaseErrorHandler($e); + }catch(NotImplementedError $e){ + $this->app->getErrorInstance()->NotImplementedHandler($e); + }catch(Exception $e){ + $this->app->getErrorInstance()->OtherException($e); + } } /** * Retrieve the details of a given project. * - * @throws [Type] [<description>] - * * @return void */ private function showProject(){ @@ -1455,21 +1250,21 @@ class identity implements Core{ //TODO parse answer }catch(BadResponseError $e){ - $this->app->getErrorInstance->BadResponseHandler($e); - }catch(UserInputError $e){ - $this->app->getErrorInstance->UserInputHandler($e); - }catch(BaseError $e){ - $this->app->getErrorInstance->BaseErrorHandler($e); - }catch(NotImplementedError $e){ - $this->app->getErrorInstance->NotImplementedHandler($e); - } + $this->app->getErrorInstance()->BadResponseHandler($e); + }catch(UserInputError $e){ + $this->app->getErrorInstance()->UserInputHandler($e); + }catch(BaseError $e){ + $this->app->getErrorInstance()->BaseErrorHandler($e); + }catch(NotImplementedError $e){ + $this->app->getErrorInstance()->NotImplementedHandler($e); + }catch(Exception $e){ + $this->app->getErrorInstance()->OtherException($e); + } } /** * Update a given project. * - * @throws [Type] [<description>] - * * @return void */ private function updateProject(){ @@ -1495,21 +1290,21 @@ class identity implements Core{ //TODO parse answer }catch(BadResponseError $e){ - $this->app->getErrorInstance->BadResponseHandler($e); - }catch(UserInputError $e){ - $this->app->getErrorInstance->UserInputHandler($e); - }catch(BaseError $e){ - $this->app->getErrorInstance->BaseErrorHandler($e); - }catch(NotImplementedError $e){ - $this->app->getErrorInstance->NotImplementedHandler($e); - } + $this->app->getErrorInstance()->BadResponseHandler($e); + }catch(UserInputError $e){ + $this->app->getErrorInstance()->UserInputHandler($e); + }catch(BaseError $e){ + $this->app->getErrorInstance()->BaseErrorHandler($e); + }catch(NotImplementedError $e){ + $this->app->getErrorInstance()->NotImplementedHandler($e); + }catch(Exception $e){ + $this->app->getErrorInstance()->OtherException($e); + } } /** * Delete a given project. * - * @throws [Type] [<description>] - * * @return void */ private function deleteProject(){ @@ -1528,21 +1323,21 @@ class identity implements Core{ //TODO parse answer }catch(BadResponseError $e){ - $this->app->getErrorInstance->BadResponseHandler($e); - }catch(UserInputError $e){ - $this->app->getErrorInstance->UserInputHandler($e); - }catch(BaseError $e){ - $this->app->getErrorInstance->BaseErrorHandler($e); - }catch(NotImplementedError $e){ - $this->app->getErrorInstance->NotImplementedHandler($e); - } + $this->app->getErrorInstance()->BadResponseHandler($e); + }catch(UserInputError $e){ + $this->app->getErrorInstance()->UserInputHandler($e); + }catch(BaseError $e){ + $this->app->getErrorInstance()->BaseErrorHandler($e); + }catch(NotImplementedError $e){ + $this->app->getErrorInstance()->NotImplementedHandler($e); + }catch(Exception $e){ + $this->app->getErrorInstance()->OtherException($e); + } } /** * List the roles of a given user in a project. * - * @throws [Type] [<description>] - * * @return void */ private function listRolesProjectUser(){ @@ -1563,21 +1358,23 @@ class identity implements Core{ //TODO parse answer }catch(BadResponseError $e){ - $this->app->getErrorInstance->BadResponseHandler($e); - }catch(UserInputError $e){ - $this->app->getErrorInstance->UserInputHandler($e); - }catch(BaseError $e){ - $this->app->getErrorInstance->BaseErrorHandler($e); - }catch(NotImplementedError $e){ - $this->app->getErrorInstance->NotImplementedHandler($e); - } + $this->app->getErrorInstance()->BadResponseHandler($e); + }catch(UserInputError $e){ + $this->app->getErrorInstance()->UserInputHandler($e); + }catch(BaseError $e){ + $this->app->getErrorInstance()->BaseErrorHandler($e); + }catch(NotImplementedError $e){ + $this->app->getErrorInstance()->NotImplementedHandler($e); + }catch(Exception $e){ + $this->app->getErrorInstance()->OtherException($e); + }catch(Exception $e){ + $this->app->getErrorInstance()->OtherException($e); + } } /** * Grant a role to an user in a project. * - * @throws [Type] [<description>] - * * @return void */ private function grantRoleProjectUser(){ @@ -1595,28 +1392,28 @@ class identity implements Core{ $project = $this->libClass->getProject($projId); $project->grantUserRole([ - 'userId' => $userId, - 'roleId' => $roleId, + 'userId' => $userId, + 'roleId' => $roleId, ]); //TODO parse answer }catch(BadResponseError $e){ - $this->app->getErrorInstance->BadResponseHandler($e); - }catch(UserInputError $e){ - $this->app->getErrorInstance->UserInputHandler($e); - }catch(BaseError $e){ - $this->app->getErrorInstance->BaseErrorHandler($e); - }catch(NotImplementedError $e){ - $this->app->getErrorInstance->NotImplementedHandler($e); - } + $this->app->getErrorInstance()->BadResponseHandler($e); + }catch(UserInputError $e){ + $this->app->getErrorInstance()->UserInputHandler($e); + }catch(BaseError $e){ + $this->app->getErrorInstance()->BaseErrorHandler($e); + }catch(NotImplementedError $e){ + $this->app->getErrorInstance()->NotImplementedHandler($e); + }catch(Exception $e){ + $this->app->getErrorInstance()->OtherException($e); + } } /** * Check if a given user has a role in a project. * - * @throws [Type] [<description>] - * * @return void */ private function checkRoleProjectUser(){ @@ -1633,8 +1430,8 @@ class identity implements Core{ $project = $this->libClass->getProject($projId); $result = $project->checkUserRole([ - 'userId' => $userId, - 'roleId' => $roleId, + 'userId' => $userId, + 'roleId' => $roleId, ]); /*if (true === $result) { @@ -1643,21 +1440,21 @@ class identity implements Core{ //TODO parse answer }catch(BadResponseError $e){ - $this->app->getErrorInstance->BadResponseHandler($e); - }catch(UserInputError $e){ - $this->app->getErrorInstance->UserInputHandler($e); - }catch(BaseError $e){ - $this->app->getErrorInstance->BaseErrorHandler($e); - }catch(NotImplementedError $e){ - $this->app->getErrorInstance->NotImplementedHandler($e); - } + $this->app->getErrorInstance()->BadResponseHandler($e); + }catch(UserInputError $e){ + $this->app->getErrorInstance()->UserInputHandler($e); + }catch(BaseError $e){ + $this->app->getErrorInstance()->BaseErrorHandler($e); + }catch(NotImplementedError $e){ + $this->app->getErrorInstance()->NotImplementedHandler($e); + }catch(Exception $e){ + $this->app->getErrorInstance()->OtherException($e); + } } /** * Delete a role for a given user in a project. * - * @throws [Type] [<description>] - * * @return void */ private function revokeRoleProjectUser(){ @@ -1675,28 +1472,28 @@ class identity implements Core{ $project = $this->libClass->getProject($projId); $project->revokeUserRole([ - 'userId' => $userId, - 'roleId' => $roleId, + 'userId' => $userId, + 'roleId' => $roleId, ]); //TODO parse answer }catch(BadResponseError $e){ - $this->app->getErrorInstance->BadResponseHandler($e); - }catch(UserInputError $e){ - $this->app->getErrorInstance->UserInputHandler($e); - }catch(BaseError $e){ - $this->app->getErrorInstance->BaseErrorHandler($e); - }catch(NotImplementedError $e){ - $this->app->getErrorInstance->NotImplementedHandler($e); - } + $this->app->getErrorInstance()->BadResponseHandler($e); + }catch(UserInputError $e){ + $this->app->getErrorInstance()->UserInputHandler($e); + }catch(BaseError $e){ + $this->app->getErrorInstance()->BaseErrorHandler($e); + }catch(NotImplementedError $e){ + $this->app->getErrorInstance()->NotImplementedHandler($e); + }catch(Exception $e){ + $this->app->getErrorInstance()->OtherException($e); + } } /** * List the roles of a group in a project. * - * @throws [Type] [<description>] - * * @return void */ private function listRolesProjectGroup(){ @@ -1708,7 +1505,7 @@ class identity implements Core{ if(!isset($projId) || !isset($groupId)){ } - + try{ $project = $this->libClass->getProject($projId); @@ -1718,21 +1515,21 @@ class identity implements Core{ //TODO parse answer }catch(BadResponseError $e){ - $this->app->getErrorInstance->BadResponseHandler($e); - }catch(UserInputError $e){ - $this->app->getErrorInstance->UserInputHandler($e); - }catch(BaseError $e){ - $this->app->getErrorInstance->BaseErrorHandler($e); - }catch(NotImplementedError $e){ - $this->app->getErrorInstance->NotImplementedHandler($e); - } + $this->app->getErrorInstance()->BadResponseHandler($e); + }catch(UserInputError $e){ + $this->app->getErrorInstance()->UserInputHandler($e); + }catch(BaseError $e){ + $this->app->getErrorInstance()->BaseErrorHandler($e); + }catch(NotImplementedError $e){ + $this->app->getErrorInstance()->NotImplementedHandler($e); + }catch(Exception $e){ + $this->app->getErrorInstance()->OtherException($e); + } } /** * Add a role to a group in a project. * - * @throws [Type] [<description>] - * * @return void */ private function grantRoleProjectGroup(){ @@ -1744,34 +1541,34 @@ class identity implements Core{ if(!isset($projId) || !isset($userId) || !isset($roleId)){ } - + try{ $project = $this->libClass->getProject($projId); $project->grantUserRole([ - 'userId' => $userId, - 'roleId' => $roleId, + 'userId' => $userId, + 'roleId' => $roleId, ]); //TODO parse answer }catch(BadResponseError $e){ - $this->app->getErrorInstance->BadResponseHandler($e); - }catch(UserInputError $e){ - $this->app->getErrorInstance->UserInputHandler($e); - }catch(BaseError $e){ - $this->app->getErrorInstance->BaseErrorHandler($e); - }catch(NotImplementedError $e){ - $this->app->getErrorInstance->NotImplementedHandler($e); - } + $this->app->getErrorInstance()->BadResponseHandler($e); + }catch(UserInputError $e){ + $this->app->getErrorInstance()->UserInputHandler($e); + }catch(BaseError $e){ + $this->app->getErrorInstance()->BaseErrorHandler($e); + }catch(NotImplementedError $e){ + $this->app->getErrorInstance()->NotImplementedHandler($e); + }catch(Exception $e){ + $this->app->getErrorInstance()->OtherException($e); + } } /** * Check if a group has a given role in a project. * - * @throws [Type] [<description>] - * * @return void */ private function checkRoleProjectGroup(){ @@ -1789,8 +1586,8 @@ class identity implements Core{ $project = $this->libClass->getProject($projId); $result = $project->checkGroupRole([ - 'groupId' => $groupId, - 'roleId' => $roleId, + 'groupId' => $groupId, + 'roleId' => $roleId, ]); /*if (true === $result) { @@ -1798,21 +1595,21 @@ class identity implements Core{ //TODO parse answer }catch(BadResponseError $e){ - $this->app->getErrorInstance->BadResponseHandler($e); - }catch(UserInputError $e){ - $this->app->getErrorInstance->UserInputHandler($e); - }catch(BaseError $e){ - $this->app->getErrorInstance->BaseErrorHandler($e); - }catch(NotImplementedError $e){ - $this->app->getErrorInstance->NotImplementedHandler($e); - } + $this->app->getErrorInstance()->BadResponseHandler($e); + }catch(UserInputError $e){ + $this->app->getErrorInstance()->UserInputHandler($e); + }catch(BaseError $e){ + $this->app->getErrorInstance()->BaseErrorHandler($e); + }catch(NotImplementedError $e){ + $this->app->getErrorInstance()->NotImplementedHandler($e); + }catch(Exception $e){ + $this->app->getErrorInstance()->OtherException($e); + } } /** * Delete a role for a group in a project. * - * @throws [Type] [<description>] - * * @return void */ private function revokeRoleProjectGroup(){ @@ -1830,28 +1627,28 @@ class identity implements Core{ $project = $this->libClass->getProject($projId); $project->revokeGroupRole([ - 'groupId' => $groupId, - 'roleId' => $roleId, + 'groupId' => $groupId, + 'roleId' => $roleId, ]); //TODO parse answer }catch(BadResponseError $e){ - $this->app->getErrorInstance->BadResponseHandler($e); - }catch(UserInputError $e){ - $this->app->getErrorInstance->UserInputHandler($e); - }catch(BaseError $e){ - $this->app->getErrorInstance->BaseErrorHandler($e); - }catch(NotImplementedError $e){ - $this->app->getErrorInstance->NotImplementedHandler($e); - } + $this->app->getErrorInstance()->BadResponseHandler($e); + }catch(UserInputError $e){ + $this->app->getErrorInstance()->UserInputHandler($e); + }catch(BaseError $e){ + $this->app->getErrorInstance()->BaseErrorHandler($e); + }catch(NotImplementedError $e){ + $this->app->getErrorInstance()->NotImplementedHandler($e); + }catch(Exception $e){ + $this->app->getErrorInstance()->OtherException($e); + } } /** * Add a role. * - * @throws [Type] [<description>] - * * @return void */ private function addRole(){ @@ -1865,20 +1662,22 @@ class identity implements Core{ try{ $role = $this->libClass->createRole([ - 'name' => $name, + 'name' => $name, ]); //TODO parse answer }catch(BadResponseError $e){ - $this->app->getErrorInstance->BadResponseHandler($e); - }catch(UserInputError $e){ - $this->app->getErrorInstance->UserInputHandler($e); - }catch(BaseError $e){ - $this->app->getErrorInstance->BaseErrorHandler($e); - }catch(NotImplementedError $e){ - $this->app->getErrorInstance->NotImplementedHandler($e); - } + $this->app->getErrorInstance()->BadResponseHandler($e); + }catch(UserInputError $e){ + $this->app->getErrorInstance()->UserInputHandler($e); + }catch(BaseError $e){ + $this->app->getErrorInstance()->BaseErrorHandler($e); + }catch(NotImplementedError $e){ + $this->app->getErrorInstance()->NotImplementedHandler($e); + }catch(Exception $e){ + $this->app->getErrorInstance()->OtherException($e); + } } /** @@ -1895,18 +1694,20 @@ class identity implements Core{ //TODO parse answer }catch(BadResponseError $e){ - $this->app->getErrorInstance->BadResponseHandler($e); - }catch(UserInputError $e){ - $this->app->getErrorInstance->UserInputHandler($e); - }catch(BaseError $e){ - $this->app->getErrorInstance->BaseErrorHandler($e); - }catch(NotImplementedError $e){ - $this->app->getErrorInstance->NotImplementedHandler($e); - } + $this->app->getErrorInstance()->BadResponseHandler($e); + }catch(UserInputError $e){ + $this->app->getErrorInstance()->UserInputHandler($e); + }catch(BaseError $e){ + $this->app->getErrorInstance()->BaseErrorHandler($e); + }catch(NotImplementedError $e){ + $this->app->getErrorInstance()->NotImplementedHandler($e); + }catch(Exception $e){ + $this->app->getErrorInstance()->OtherException($e); + } } /** - * @todo + * List the different assignments for a given role * * @return void */ @@ -1919,21 +1720,21 @@ class identity implements Core{ //TODO parse answer }catch(BadResponseError $e){ - $this->app->getErrorInstance->BadResponseHandler($e); - }catch(UserInputError $e){ - $this->app->getErrorInstance->UserInputHandler($e); - }catch(BaseError $e){ - $this->app->getErrorInstance->BaseErrorHandler($e); - }catch(NotImplementedError $e){ - $this->app->getErrorInstance->NotImplementedHandler($e); - } + $this->app->getErrorInstance()->BadResponseHandler($e); + }catch(UserInputError $e){ + $this->app->getErrorInstance()->UserInputHandler($e); + }catch(BaseError $e){ + $this->app->getErrorInstance()->BaseErrorHandler($e); + }catch(NotImplementedError $e){ + $this->app->getErrorInstance()->NotImplementedHandler($e); + }catch(Exception $e){ + $this->app->getErrorInstance()->OtherException($e); + } } /** * Add a service. * - * @throws [Type] [<description>] - * * @return void */ private function addService(){ @@ -1947,21 +1748,23 @@ class identity implements Core{ try{ $service = $this->libClass->createService([ - 'name' => $name, - 'type' => $type, + 'name' => $name, + 'type' => $type, ]); //TODO parse answer }catch(BadResponseError $e){ - $this->app->getErrorInstance->BadResponseHandler($e); - }catch(UserInputError $e){ - $this->app->getErrorInstance->UserInputHandler($e); - }catch(BaseError $e){ - $this->app->getErrorInstance->BaseErrorHandler($e); - }catch(NotImplementedError $e){ - $this->app->getErrorInstance->NotImplementedHandler($e); - } + $this->app->getErrorInstance()->BadResponseHandler($e); + }catch(UserInputError $e){ + $this->app->getErrorInstance()->UserInputHandler($e); + }catch(BaseError $e){ + $this->app->getErrorInstance()->BaseErrorHandler($e); + }catch(NotImplementedError $e){ + $this->app->getErrorInstance()->NotImplementedHandler($e); + }catch(Exception $e){ + $this->app->getErrorInstance()->OtherException($e); + } } /** @@ -1978,21 +1781,21 @@ class identity implements Core{ //TODO parse answer }catch(BadResponseError $e){ - $this->app->getErrorInstance->BadResponseHandler($e); - }catch(UserInputError $e){ - $this->app->getErrorInstance->UserInputHandler($e); - }catch(BaseError $e){ - $this->app->getErrorInstance->BaseErrorHandler($e); - }catch(NotImplementedError $e){ - $this->app->getErrorInstance->NotImplementedHandler($e); - } + $this->app->getErrorInstance()->BadResponseHandler($e); + }catch(UserInputError $e){ + $this->app->getErrorInstance()->UserInputHandler($e); + }catch(BaseError $e){ + $this->app->getErrorInstance()->BaseErrorHandler($e); + }catch(NotImplementedError $e){ + $this->app->getErrorInstance()->NotImplementedHandler($e); + }catch(Exception $e){ + $this->app->getErrorInstance()->OtherException($e); + } } /** * Retrieve the details for a given service. * - * @throws [Type] [<description>] - * * @return void */ private function showService(){ @@ -2009,21 +1812,21 @@ class identity implements Core{ //TODO parse answer }catch(BadResponseError $e){ - $this->app->getErrorInstance->BadResponseHandler($e); - }catch(UserInputError $e){ - $this->app->getErrorInstance->UserInputHandler($e); - }catch(BaseError $e){ - $this->app->getErrorInstance->BaseErrorHandler($e); - }catch(NotImplementedError $e){ - $this->app->getErrorInstance->NotImplementedHandler($e); - } + $this->app->getErrorInstance()->BadResponseHandler($e); + }catch(UserInputError $e){ + $this->app->getErrorInstance()->UserInputHandler($e); + }catch(BaseError $e){ + $this->app->getErrorInstance()->BaseErrorHandler($e); + }catch(NotImplementedError $e){ + $this->app->getErrorInstance()->NotImplementedHandler($e); + }catch(Exception $e){ + $this->app->getErrorInstance()->OtherException($e); + } } /** * Delete a given service. * - * @throws [Type] [<description>] - * * @return void */ private function deleteService(){ @@ -2043,21 +1846,21 @@ class identity implements Core{ //TODO parse answer }catch(BadResponseError $e){ - $this->app->getErrorInstance->BadResponseHandler($e); - }catch(UserInputError $e){ - $this->app->getErrorInstance->UserInputHandler($e); - }catch(BaseError $e){ - $this->app->getErrorInstance->BaseErrorHandler($e); - }catch(NotImplementedError $e){ - $this->app->getErrorInstance->NotImplementedHandler($e); - } + $this->app->getErrorInstance()->BadResponseHandler($e); + }catch(UserInputError $e){ + $this->app->getErrorInstance()->UserInputHandler($e); + }catch(BaseError $e){ + $this->app->getErrorInstance()->BaseErrorHandler($e); + }catch(NotImplementedError $e){ + $this->app->getErrorInstance()->NotImplementedHandler($e); + }catch(Exception $e){ + $this->app->getErrorInstance()->OtherException($e); + } } /** * Generate a new token for a given user id. * - * @throws [Type] [<description>] - * * @return void */ private function genTokenUserID(){ @@ -2072,30 +1875,30 @@ class identity implements Core{ try{ $token = $this->libClass->generateToken([ - 'user' => [ - 'id' => $userId, - 'password' => $userPass - ] + 'user' => [ + 'id' => $userId, + 'password' => $userPass + ] ]); //TODO parse answer }catch(BadResponseError $e){ - $this->app->getErrorInstance->BadResponseHandler($e); - }catch(UserInputError $e){ - $this->app->getErrorInstance->UserInputHandler($e); - }catch(BaseError $e){ - $this->app->getErrorInstance->BaseErrorHandler($e); - }catch(NotImplementedError $e){ - $this->app->getErrorInstance->NotImplementedHandler($e); - } + $this->app->getErrorInstance()->BadResponseHandler($e); + }catch(UserInputError $e){ + $this->app->getErrorInstance()->UserInputHandler($e); + }catch(BaseError $e){ + $this->app->getErrorInstance()->BaseErrorHandler($e); + }catch(NotImplementedError $e){ + $this->app->getErrorInstance()->NotImplementedHandler($e); + }catch(Exception $e){ + $this->app->getErrorInstance()->OtherException($e); + } } /** * Generate a new token for a given user name. * - * @throws [Type] [<description>] - * * @return void */ private function genTokenUserName(){ @@ -2111,33 +1914,33 @@ class identity implements Core{ try{ $token = $this->libClass->generateToken([ - 'user' => [ - 'name' => $username, - 'password' => $userPass, - 'domain' => [ - 'id' => $domId - ] - ] + 'user' => [ + 'name' => $username, + 'password' => $userPass, + 'domain' => [ + 'id' => $domId + ] + ] ]); //TODO parse answer }catch(BadResponseError $e){ - $this->app->getErrorInstance->BadResponseHandler($e); - }catch(UserInputError $e){ - $this->app->getErrorInstance->UserInputHandler($e); - }catch(BaseError $e){ - $this->app->getErrorInstance->BaseErrorHandler($e); - }catch(NotImplementedError $e){ - $this->app->getErrorInstance->NotImplementedHandler($e); - } + $this->app->getErrorInstance()->BadResponseHandler($e); + }catch(UserInputError $e){ + $this->app->getErrorInstance()->UserInputHandler($e); + }catch(BaseError $e){ + $this->app->getErrorInstance()->BaseErrorHandler($e); + }catch(NotImplementedError $e){ + $this->app->getErrorInstance()->NotImplementedHandler($e); + }catch(Exception $e){ + $this->app->getErrorInstance()->OtherException($e); + } } /** * Generate a new token from another token ID. * - * @throws [Type] [<description>] - * * @return void */ private function genTokenID(){ @@ -2152,28 +1955,28 @@ class identity implements Core{ try{ $token = $this->libClass->generateToken([ - 'tokenId' => $tokenId, - 'scope' => ['project' => ['id' => $projectId]] + 'tokenId' => $tokenId, + 'scope' => ['project' => ['id' => $projectId]] ]); //TODO parse answer }catch(BadResponseError $e){ - $this->app->getErrorInstance->BadResponseHandler($e); - }catch(UserInputError $e){ - $this->app->getErrorInstance->UserInputHandler($e); - }catch(BaseError $e){ - $this->app->getErrorInstance->BaseErrorHandler($e); - }catch(NotImplementedError $e){ - $this->app->getErrorInstance->NotImplementedHandler($e); - } + $this->app->getErrorInstance()->BadResponseHandler($e); + }catch(UserInputError $e){ + $this->app->getErrorInstance()->UserInputHandler($e); + }catch(BaseError $e){ + $this->app->getErrorInstance()->BaseErrorHandler($e); + }catch(NotImplementedError $e){ + $this->app->getErrorInstance()->NotImplementedHandler($e); + }catch(Exception $e){ + $this->app->getErrorInstance()->OtherException($e); + } } /** * Generate a new token scoped by a project ID. * - * @throws [Type] [<description>] - * * @return void */ private function genTokenScopedProjectID(){ @@ -2189,33 +1992,33 @@ class identity implements Core{ try{ $token = $this->libClass->generateToken([ - 'user' => [ - 'id' => $userId, - 'password' => $userPass - ], - 'scope' => [ - 'project' => ['id' => $projId] - ] + 'user' => [ + 'id' => $userId, + 'password' => $userPass + ], + 'scope' => [ + 'project' => ['id' => $projId] + ] ]); //TODO parse answer }catch(BadResponseError $e){ - $this->app->getErrorInstance->BadResponseHandler($e); - }catch(UserInputError $e){ - $this->app->getErrorInstance->UserInputHandler($e); - }catch(BaseError $e){ - $this->app->getErrorInstance->BaseErrorHandler($e); - }catch(NotImplementedError $e){ - $this->app->getErrorInstance->NotImplementedHandler($e); - } + $this->app->getErrorInstance()->BadResponseHandler($e); + }catch(UserInputError $e){ + $this->app->getErrorInstance()->UserInputHandler($e); + }catch(BaseError $e){ + $this->app->getErrorInstance()->BaseErrorHandler($e); + }catch(NotImplementedError $e){ + $this->app->getErrorInstance()->NotImplementedHandler($e); + }catch(Exception $e){ + $this->app->getErrorInstance()->OtherException($e); + } } /** * Generate a new token scoped by a project name. * - * @throws [Type] [<description>] - * * @return void */ private function genTokenScopedProjectName(){ @@ -2232,38 +2035,38 @@ class identity implements Core{ try{ $token = $this->libClass->generateToken([ - 'user' => [ - 'id' => $userId, - 'password' => $userPass - ], - 'scope' => [ - 'project' => [ - 'name' => $projName, - 'domain' => [ - 'id' => $domId - ] - ] - ] + 'user' => [ + 'id' => $userId, + 'password' => $userPass + ], + 'scope' => [ + 'project' => [ + 'name' => $projName, + 'domain' => [ + 'id' => $domId + ] + ] + ] ]); //TODO parse answer }catch(BadResponseError $e){ - $this->app->getErrorInstance->BadResponseHandler($e); - }catch(UserInputError $e){ - $this->app->getErrorInstance->UserInputHandler($e); - }catch(BaseError $e){ - $this->app->getErrorInstance->BaseErrorHandler($e); - }catch(NotImplementedError $e){ - $this->app->getErrorInstance->NotImplementedHandler($e); - } + $this->app->getErrorInstance()->BadResponseHandler($e); + }catch(UserInputError $e){ + $this->app->getErrorInstance()->UserInputHandler($e); + }catch(BaseError $e){ + $this->app->getErrorInstance()->BaseErrorHandler($e); + }catch(NotImplementedError $e){ + $this->app->getErrorInstance()->NotImplementedHandler($e); + }catch(Exception $e){ + $this->app->getErrorInstance()->OtherException($e); + } } /** * Check if a token is validate. * - * @throws [Type] [<description>] - * * @return void */ private function validateToken(){ @@ -2285,21 +2088,21 @@ class identity implements Core{ //TODO parse answer }catch(BadResponseError $e){ - $this->app->getErrorInstance->BadResponseHandler($e); - }catch(UserInputError $e){ - $this->app->getErrorInstance->UserInputHandler($e); - }catch(BaseError $e){ - $this->app->getErrorInstance->BaseErrorHandler($e); - }catch(NotImplementedError $e){ - $this->app->getErrorInstance->NotImplementedHandler($e); - } + $this->app->getErrorInstance()->BadResponseHandler($e); + }catch(UserInputError $e){ + $this->app->getErrorInstance()->UserInputHandler($e); + }catch(BaseError $e){ + $this->app->getErrorInstance()->BaseErrorHandler($e); + }catch(NotImplementedError $e){ + $this->app->getErrorInstance()->NotImplementedHandler($e); + }catch(Exception $e){ + $this->app->getErrorInstance()->OtherException($e); + } } /** * Delete a given token. * - * @throws [Type] [<description>] - * * @return void */ private function revokeToken(){ @@ -2317,21 +2120,21 @@ class identity implements Core{ //TODO parse answer }catch(BadResponseError $e){ - $this->app->getErrorInstance->BadResponseHandler($e); - }catch(UserInputError $e){ - $this->app->getErrorInstance->UserInputHandler($e); - }catch(BaseError $e){ - $this->app->getErrorInstance->BaseErrorHandler($e); - }catch(NotImplementedError $e){ - $this->app->getErrorInstance->NotImplementedHandler($e); - } + $this->app->getErrorInstance()->BadResponseHandler($e); + }catch(UserInputError $e){ + $this->app->getErrorInstance()->UserInputHandler($e); + }catch(BaseError $e){ + $this->app->getErrorInstance()->BaseErrorHandler($e); + }catch(NotImplementedError $e){ + $this->app->getErrorInstance()->NotImplementedHandler($e); + }catch(Exception $e){ + $this->app->getErrorInstance()->OtherException($e); + } } /** * Add a new user. * - * @throws [Type] [<description>] - * * @return void */ private function addUser(){ @@ -2344,32 +2147,34 @@ class identity implements Core{ $domId = $this->app->getPostParam("domId"); if(!isset($domId) || !isset($groupId)){ - + } try{ $user = $this->libClass->createUser([ - 'defaultProjectId' => $projId, - 'description' => $desc, - 'domainId' => $domId, - 'email' => $email, - 'enabled' => true, - 'name' => $name, - 'password' => $pass + 'defaultProjectId' => $projId, + 'description' => $desc, + 'domainId' => $domId, + 'email' => $email, + 'enabled' => true, + 'name' => $name, + 'password' => $pass ]); //TODO parse answer }catch(BadResponseError $e){ - $this->app->getErrorInstance->BadResponseHandler($e); - }catch(UserInputError $e){ - $this->app->getErrorInstance->UserInputHandler($e); - }catch(BaseError $e){ - $this->app->getErrorInstance->BaseErrorHandler($e); - }catch(NotImplementedError $e){ - $this->app->getErrorInstance->NotImplementedHandler($e); - } + $this->app->getErrorInstance()->BadResponseHandler($e); + }catch(UserInputError $e){ + $this->app->getErrorInstance()->UserInputHandler($e); + }catch(BaseError $e){ + $this->app->getErrorInstance()->BaseErrorHandler($e); + }catch(NotImplementedError $e){ + $this->app->getErrorInstance()->NotImplementedHandler($e); + }catch(Exception $e){ + $this->app->getErrorInstance()->OtherException($e); + } } /** @@ -2386,21 +2191,21 @@ class identity implements Core{ //TODO parse answer }catch(BadResponseError $e){ - $this->app->getErrorInstance->BadResponseHandler($e); - }catch(UserInputError $e){ - $this->app->getErrorInstance->UserInputHandler($e); - }catch(BaseError $e){ - $this->app->getErrorInstance->BaseErrorHandler($e); - }catch(NotImplementedError $e){ - $this->app->getErrorInstance->NotImplementedHandler($e); - } + $this->app->getErrorInstance()->BadResponseHandler($e); + }catch(UserInputError $e){ + $this->app->getErrorInstance()->UserInputHandler($e); + }catch(BaseError $e){ + $this->app->getErrorInstance()->BaseErrorHandler($e); + }catch(NotImplementedError $e){ + $this->app->getErrorInstance()->NotImplementedHandler($e); + }catch(Exception $e){ + $this->app->getErrorInstance()->OtherException($e); + } } /** * Retrieve the details of a given user. * - * @throws [Type] [<description>] - * * @return void */ private function showUser(){ @@ -2419,21 +2224,21 @@ class identity implements Core{ //TODO parse answer }catch(BadResponseError $e){ - $this->app->getErrorInstance->BadResponseHandler($e); - }catch(UserInputError $e){ - $this->app->getErrorInstance->UserInputHandler($e); - }catch(BaseError $e){ - $this->app->getErrorInstance->BaseErrorHandler($e); - }catch(NotImplementedError $e){ - $this->app->getErrorInstance->NotImplementedHandler($e); - } + $this->app->getErrorInstance()->BadResponseHandler($e); + }catch(UserInputError $e){ + $this->app->getErrorInstance()->UserInputHandler($e); + }catch(BaseError $e){ + $this->app->getErrorInstance()->BaseErrorHandler($e); + }catch(NotImplementedError $e){ + $this->app->getErrorInstance()->NotImplementedHandler($e); + }catch(Exception $e){ + $this->app->getErrorInstance()->OtherException($e); + } } /** * Update a given user. * - * @throws [Type] [<description>] - * * @return void */ private function updateUser(){ @@ -2458,21 +2263,21 @@ class identity implements Core{ //TODO parse answer }catch(BadResponseError $e){ - $this->app->getErrorInstance->BadResponseHandler($e); - }catch(UserInputError $e){ - $this->app->getErrorInstance->UserInputHandler($e); - }catch(BaseError $e){ - $this->app->getErrorInstance->BaseErrorHandler($e); - }catch(NotImplementedError $e){ - $this->app->getErrorInstance->NotImplementedHandler($e); - } + $this->app->getErrorInstance()->BadResponseHandler($e); + }catch(UserInputError $e){ + $this->app->getErrorInstance()->UserInputHandler($e); + }catch(BaseError $e){ + $this->app->getErrorInstance()->BaseErrorHandler($e); + }catch(NotImplementedError $e){ + $this->app->getErrorInstance()->NotImplementedHandler($e); + }catch(Exception $e){ + $this->app->getErrorInstance()->OtherException($e); + } } /** * Delete a given user. * - * @throws [Type] [<description>] - * * @return void */ private function deleteUser(){ @@ -2491,21 +2296,21 @@ class identity implements Core{ //TODO parse answer }catch(BadResponseError $e){ - $this->app->getErrorInstance->BadResponseHandler($e); - }catch(UserInputError $e){ - $this->app->getErrorInstance->UserInputHandler($e); - }catch(BaseError $e){ - $this->app->getErrorInstance->BaseErrorHandler($e); - }catch(NotImplementedError $e){ - $this->app->getErrorInstance->NotImplementedHandler($e); - } + $this->app->getErrorInstance()->BadResponseHandler($e); + }catch(UserInputError $e){ + $this->app->getErrorInstance()->UserInputHandler($e); + }catch(BaseError $e){ + $this->app->getErrorInstance()->BaseErrorHandler($e); + }catch(NotImplementedError $e){ + $this->app->getErrorInstance()->NotImplementedHandler($e); + }catch(Exception $e){ + $this->app->getErrorInstance()->OtherException($e); + } } /** * Retrieve the groups which contains a given user. * - * @throws [Type] [<description>] - * * @return void */ private function listUserGroups(){ @@ -2525,21 +2330,21 @@ class identity implements Core{ //TODO parse answer }catch(BadResponseError $e){ - $this->app->getErrorInstance->BadResponseHandler($e); - }catch(UserInputError $e){ - $this->app->getErrorInstance->UserInputHandler($e); - }catch(BaseError $e){ - $this->app->getErrorInstance->BaseErrorHandler($e); - }catch(NotImplementedError $e){ - $this->app->getErrorInstance->NotImplementedHandler($e); - } + $this->app->getErrorInstance()->BadResponseHandler($e); + }catch(UserInputError $e){ + $this->app->getErrorInstance()->UserInputHandler($e); + }catch(BaseError $e){ + $this->app->getErrorInstance()->BaseErrorHandler($e); + }catch(NotImplementedError $e){ + $this->app->getErrorInstance()->NotImplementedHandler($e); + }catch(Exception $e){ + $this->app->getErrorInstance()->OtherException($e); + } } /** * Retrieve the projects which contains a given user. * - * @throws [Type] [<description>] - * * @return void */ private function listUserProjects(){ @@ -2559,13 +2364,15 @@ class identity implements Core{ //TODO parse answer }catch(BadResponseError $e){ - $this->app->getErrorInstance->BadResponseHandler($e); - }catch(UserInputError $e){ - $this->app->getErrorInstance->UserInputHandler($e); - }catch(BaseError $e){ - $this->app->getErrorInstance->BaseErrorHandler($e); - }catch(NotImplementedError $e){ - $this->app->getErrorInstance->NotImplementedHandler($e); - } + $this->app->getErrorInstance()->BadResponseHandler($e); + }catch(UserInputError $e){ + $this->app->getErrorInstance()->UserInputHandler($e); + }catch(BaseError $e){ + $this->app->getErrorInstance()->BaseErrorHandler($e); + }catch(NotImplementedError $e){ + $this->app->getErrorInstance()->NotImplementedHandler($e); + }catch(Exception $e){ + $this->app->getErrorInstance()->OtherException($e); + } } } |
