/** * Gets the roles of the user */ function &getRoles() { if ($this->roles == null) { $roleMapper = new RoleMapper(); $this->roles = $roleMapper->findByUserId($this->getId()); } return $this->roles; }
/** * Gets the assigned role object */ function getRole() { if ($this->role == null) { $roleMapper = new RoleMapper(); $this->role = $roleMapper->get($this->getRoleID()); } return $this->role; }