Esempio n. 1
0
		public static function wrap($auths)
		{
			$authList = array();
			foreach( $auths as $auth )
			{
				$role = Role::getByID($auth['roleid']);
				array_push($authList, new Authentication($auth, $role));
			}
			
			return $authList;
		}
Esempio n. 2
0
		public function __get($var)
		{
			if( $var == 'role' )
			{
				return Role::getByID($this->roleid);
			}
			else
			{
				return $this->$var;
			}
		}
Esempio n. 3
0
		public function __get($var){
			if( strtolower($var) == 'role' ){
				return Role::getByID($this->roleid);
			}
			elseif( strtolower($var) == 'user' ){
				return User::getByID($this->userid);
			}
			else{
				return $this->$var;
			}
		}