protected function addRole($groupName, $name)
    {

        // load the application
        $application = RequestHandler::getApplicationContext();

        // query whether or not, the group already exists
        if ($this->setsMap->exists($groupName) === false) {
            $group = new SimpleGroup(new String($groupName));
            $this->setsMap->add($groupName, $group);
        } else {
            $group = $this->setsMap->get($groupName);
        }

        try {
            // finally add the identity to the group
            $group->addMember($this->createIdentity(new String($name)));

        } catch (\Exception $e) {
            $application->getNamingDirectory()
                        ->search(NamingDirectoryKeys::SYSTEM_LOGGER)
                        ->error($e->__toString());
        }
    }
protected function addRole($groupName, $name)
    {

        // load the application
        $application = RequestHandler::getApplicationContext();

        // query whether or not, the group already exists
        if ($this->setsMap->exists($groupName) === false) {
            $group = new SimpleGroup(new String($groupName));
            $this->setsMap->add($groupName, $group);
        } else {
            $group = $this->setsMap->get($groupName);
        }

        try {
            // finally add the identity to the group
            $group->addMember($this->createIdentity(new String($name)));

        } catch (\Exception $e) {
            $application->getNamingDirectory()
                        ->search(NamingDirectoryKeys::SYSTEM_LOGGER)
                        ->error($e->__toString());
        }
    }
protected function addRole ( $ groupName , $ name ) { // load the application $ application = RequestHandler :: getApplicationContext ( ) ; // query whether or not, the group already exists if ( $ this -> setsMap -> exists ( $ groupName ) === false ) { $ group = new SimpleGroup ( new String ( $ groupName ) ) ; $ this -> setsMap -> add ( $ groupName , $ group ) ; } else { $ group = $ this -> setsMap -> get ( $ groupName ) ; } try { // finally add the identity to the group $ group -> addMember ( $ this -> createIdentity ( new String ( $ name ) ) ) ; } catch ( \ Exception $ e ) { $ application -> getNamingDirectory ( ) -> search ( NamingDirectoryKeys :: SYSTEM_LOGGER ) -> error ( $ e -> __toString ( ) ) ; } }
Adds a role to the hash map with the roles.

@param string $groupName The name of the group
@param string $name      The name of the role to be added to the group

@return void
Adds a role to the hash map with the roles .