Ejemplo n.º 1
0
		public static function wrap($users)
		{
			$userList = array();
			foreach( $users as $user )
			{
				$auth = Authentication::getByUserID($id);
				array_push($userList, new User($user, $auth));
			}
			
			return $userList;
		}
Ejemplo n.º 2
0
		public function __get($var)
		{
			if( $var == 'favorites' )
			{
				return Order::getByUserFavorites($this->userid);
			}
			elseif( $var == 'authentication' )
			{
				return Authentication::getByUserID($this->userid);
			}
			elseif( $var == 'Predict' )
			{
				return new Predict($this);
			}
			elseif( $var == 'ratings' )
			{
				return Rating::getByUser($this->userid);
			}
			elseif( $var == 'views' )
			{
				return View::getByUser($this->userid);
			}
			else
			{
				return $this->$var;
			}
		}
Ejemplo n.º 3
0
		public function __get($var){
			if( strtolower($var) == 'authentication' ){
				return Authentication::getByUserID($this->userid);
			}
			elseif( strtolower($var) == 'contact' ){
				return Contact::getByUserID($this->userid);
			}
			elseif( strtolower($var) == 'fullname' ){
				return $this->fname . " " . $this->lname;
			}
			else{
				return $this->$var;
			}
		}