src/snac/server/database/DBUser.php
/**
     * Read a role object from the database
     *
     * Select role data from the database, and populate a role object.
     *
     * @param integer $rid Role ID value.
     *
     * @return \snac\data\Role A Role object.
     *
     */
Read a role object from the database
Select role data from the database, and populate a role object.

@param integer $rid Role ID value.

@return \snac\data\Role A Role object.
Read a role object from the database Select role data from the database and populate a role object . @param integer $rid Role ID value . @return \ snac \ data \ Role A Role object .
public function readRole($rid)
    {
        $row = $this->sql->selectRole($rid);
        $roleObj = new \snac\data\Role();
        $roleObj->setID($row['id']);
        $roleObj->setLabel($row['label']);
        $roleObj->setDescription($row['description']);
        foreach($row['pid_list'] as $pid)
        {
            $roleObj->addPrivilege($this->populatePrivilege($pid));
        }
        return $roleObj;
    }
public function readRole ( $ rid ) { $ row = $ this -> sql -> selectRole ( $ rid ) ; $ roleObj = new \ snac \ data \ Role ( ) ; $ roleObj -> setID ( $ row [ 'id' ] ) ; $ roleObj -> setLabel ( $ row [ 'label' ] ) ; $ roleObj -> setDescription ( $ row [ 'description' ] ) ; foreach ( $ row [ 'pid_list' ] as $ pid ) { $ roleObj -> addPrivilege ( $ this -> populatePrivilege ( $ pid ) ) ; } return $ roleObj ; }
Read a role object from the database
 Select role data from the database, and populate a role object.
Read a role object from the database Select role data from the database and populate a role object .