PHP 인터페이스 Symfony\Component\Serializer\SerializerInterface

저자: Jordi Boggiano ([email protected])
파일 보기 프로젝트 열기: pmjones/php-framework-benchmarks 0 사용 예제들

공개 메소드들

메소드 설명
decode ( string $data, string $format ) : mixed Decodes a string from the given format back into PHP data
denormalize ( mixed $data, string $type, string $format = null ) : mixed Denormalizes data into the given type.
deserialize ( mixed $data, string $type, string $format ) Deserializes data into the given type.
encode ( mixed $data, string $format ) : array | scalar Encodes data into the given format
getEncoder ( $format ) : Symfony\Component\Serializer\Encoder\EncoderInterface Get the encoder for the given format
normalize ( mixed $data, string $format = null ) : array | scalar Normalizes any data into a set of arrays/scalars
serialize ( mixed $data, string $format ) : string Serializes data in the appropriate format
supportsDecoding ( string $format ) : boolean Checks whether the serializer can decode from given format
supportsDeserialization ( string $format ) : boolean Checks whether the serializer can deserialize from given format
supportsEncoding ( string $format ) : boolean Checks whether the serializer can encode to given format
supportsSerialization ( string $format ) : boolean Checks whether the serializer can serialize to given format

메소드 상세

decode() 공개 메소드

Decodes a string from the given format back into PHP data
public decode ( string $data, string $format ) : mixed
$data string data to decode
$format string format name
리턴 mixed

denormalize() 공개 메소드

Denormalizes data into the given type.
public denormalize ( mixed $data, string $type, string $format = null ) : mixed
$data mixed
$type string
$format string
리턴 mixed

deserialize() 공개 메소드

Deserializes data into the given type.
public deserialize ( mixed $data, string $type, string $format )
$data mixed
$type string
$format string

encode() 공개 메소드

Encodes data into the given format
public encode ( mixed $data, string $format ) : array | scalar
$data mixed data to encode
$format string format name
리턴 array | scalar

getEncoder() 공개 메소드

Get the encoder for the given format
public getEncoder ( $format ) : Symfony\Component\Serializer\Encoder\EncoderInterface
리턴 Symfony\Component\Serializer\Encoder\EncoderInterface

normalize() 공개 메소드

Normalizes any data into a set of arrays/scalars
public normalize ( mixed $data, string $format = null ) : array | scalar
$data mixed data to normalize
$format string format name, present to give the option to normalizers to act differently based on formats
리턴 array | scalar

serialize() 공개 메소드

Serializes data in the appropriate format
public serialize ( mixed $data, string $format ) : string
$data mixed any data
$format string format name
리턴 string

supportsDecoding() 공개 메소드

Checks whether the serializer can decode from given format
public supportsDecoding ( string $format ) : boolean
$format string format name
리턴 boolean

supportsDeserialization() 공개 메소드

Checks whether the serializer can deserialize from given format
public supportsDeserialization ( string $format ) : boolean
$format string format name
리턴 boolean

supportsEncoding() 공개 메소드

Checks whether the serializer can encode to given format
public supportsEncoding ( string $format ) : boolean
$format string format name
리턴 boolean

supportsSerialization() 공개 메소드

Checks whether the serializer can serialize to given format
public supportsSerialization ( string $format ) : boolean
$format string format name
리턴 boolean