src/Ubiquity/utils/http/USession.php
public static function apply($key, $callback, $default = NULL) {
		$value = self::get ( $key, $default );
		if (is_string ( $callback ) && function_exists ( $callback )) {
			$value = call_user_func ( $callback, $value );
		} elseif (is_callable ( $callback )) {
			$value = $callback ( $value );
		} else {
			return $value;
		}
		return self::set ( $key, $value );
	}
public static function apply($key, $callback, $default = NULL) {
		$value = self::get ( $key, $default );
		if (is_string ( $callback ) && function_exists ( $callback )) {
			$value = call_user_func ( $callback, $value );
		} elseif (is_callable ( $callback )) {
			$value = $callback ( $value );
		} else {
			return $value;
		}
		return self::set ( $key, $value );
	}
public static function apply ( $ key , $ callback , $ default = NULL ) { $ value = self :: get ( $ key , $ default ) ; if ( is_string ( $ callback ) && function_exists ( $ callback ) ) { $ value = call_user_func ( $ callback , $ value ) ; } elseif ( is_callable ( $ callback ) ) { $ value = $ callback ( $ value ) ; } else { return $ value ; } return self :: set ( $ key , $ value ) ; }
Applies a callback function to the value at the key index in session

@param string $key
@param string|callable $callback
@return mixed
Applies a callback function to the value at the key index in session