Пример #1
0
 /**
  * Gets the roles of the user
  */
 function &getRoles()
 {
     if ($this->roles == null) {
         $roleMapper = new RoleMapper();
         $this->roles = $roleMapper->findByUserId($this->getId());
     }
     return $this->roles;
 }
Пример #2
0
 /**
  * Gets the assigned role object
  */
 function getRole()
 {
     if ($this->role == null) {
         $roleMapper = new RoleMapper();
         $this->role = $roleMapper->get($this->getRoleID());
     }
     return $this->role;
 }