original_string: public static function encode( array $data ) {
  		$format = ini_get( 'session.serialize_handler' );
  		if ( !is_string( $format ) ) {
  			throw new \UnexpectedValueException(
  				'Could not fetch the value of session.serialize_handler'
  			);
  		}
  		switch ( $format ) {
  			case 'php':
  				return self::encodePhp( $data );
  
  			case 'php_binary':
  				return self::encodePhpBinary( $data );
  
  			case 'php_serialize':
  				return self::encodePhpSerialize( $data );
  
  			default:
  				throw new \DomainException( "Unsupported format \"$format\"" );
  		}
  	}
code: public static function encode( array $data ) {
  		$format = ini_get( 'session.serialize_handler' );
  		if ( !is_string( $format ) ) {
  			throw new \UnexpectedValueException(
  				'Could not fetch the value of session.serialize_handler'
  			);
  		}
  		switch ( $format ) {
  			case 'php':
  				return self::encodePhp( $data );
  
  			case 'php_binary':
  				return self::encodePhpBinary( $data );
  
  			case 'php_serialize':
  				return self::encodePhpSerialize( $data );
  
  			default:
  				throw new \DomainException( "Unsupported format \"$format\"" );
  		}
  	}
code_tokens: public static function encode ( array $ data ) { $ format = ini_get ( 'session.serialize_handler' ) ; if ( ! is_string ( $ format ) ) { throw new \ UnexpectedValueException ( 'Could not fetch the value of session.serialize_handler' ) ; } switch ( $ format ) { case 'php' : return self :: encodePhp ( $ data ) ; case 'php_binary' : return self :: encodePhpBinary ( $ data ) ; case 'php_serialize' : return self :: encodePhpSerialize ( $ data ) ; default : throw new \ DomainException ( "Unsupported format \"$format\"" ) ; } }
docstring: Encode a session array to a string, using the format in session.serialize_handler
  @param array $data Session data
  @return string|null Encoded string, or null on failure
  @throws \\DomainException
docstring_tokens: Encode a session array to a string using the format in session . serialize_handler