public static function encodePhp( array $data ) {
		$ret = '';
		foreach ( $data as $key => $value ) {
			if ( strcmp( $key, intval( $key ) ) === 0 ) {
				self::$logger->warning( "Ignoring unsupported integer key \"$key\"" );
				continue;
			}
			if ( strcspn( $key, '|!' ) !== strlen( $key ) ) {
				self::$logger->error( "Serialization failed: Key with unsupported characters \"$key\"" );
				return null;
			}
			$v = self::serializeValue( $value );
			if ( $v === null ) {
				return null;
			}
			$ret .= "$key|$v";
		}
		return $ret;
	}
public static function encodePhp( array $data ) {
		$ret = '';
		foreach ( $data as $key => $value ) {
			if ( strcmp( $key, intval( $key ) ) === 0 ) {
				self::$logger->warning( "Ignoring unsupported integer key \"$key\"" );
				continue;
			}
			if ( strcspn( $key, '|!' ) !== strlen( $key ) ) {
				self::$logger->error( "Serialization failed: Key with unsupported characters \"$key\"" );
				return null;
			}
			$v = self::serializeValue( $value );
			if ( $v === null ) {
				return null;
			}
			$ret .= "$key|$v";
		}
		return $ret;
	}
public static function encodePhp ( array $ data ) { $ ret = '' ; foreach ( $ data as $ key => $ value ) { if ( strcmp ( $ key , intval ( $ key ) ) === 0 ) { self :: $ logger -> warning ( "Ignoring unsupported integer key \"$key\"" ) ; continue ; } if ( strcspn ( $ key , '|!' ) !== strlen ( $ key ) ) { self :: $ logger -> error ( "Serialization failed: Key with unsupported characters \"$key\"" ) ; return null ; } $ v = self :: serializeValue ( $ value ) ; if ( $ v === null ) { return null ; } $ ret .= "$key|$v" ; } return $ ret ; }
Encode a session array to a string in 'php' format
@note Generally you'll use self::encode() instead of this method.
@param array $data Session data
@return string|null Encoded string, or null on failure
Encode a session array to a string in php format