public static function get( $var, $key, $default = null ) {

		if( $key === null )
			return $var;
		elseif( isset($var->$key) )
			return $var->$key;
		elseif( isset($var[$key]) )
			return $var[$key];
		else
			return $default;

	}