Serial Library



( ZN >= 3.0.0 )

A class that converts a textual expression to a specific content. Available for one-dimensional content .

 

# Methods


String encode ( Array $ data )
Object decode ( String $ word )
Array decodeArray ( String $ word )

 

# Encode ( ZN >= 3.0.0 )


Separates strings with special characters and switches and values. JSON , serialize similar to the use of such structures.

Parameters

Array $ data It's a series of specs to be styled.
return String

Use of

$encode = Separator::encode(['foo' => 'Foo', 'bar' => 'Bar']);

output($encode);
foo |? - + + -? | Foo + -? |? - + bar |? - + + -? | Bar

 

# Decode ( ZN >= 3.0.0 )


Used to decrypt the encrypted data in the object type.

Parameters

String $ data Data to be resolved.
return Object

Use of

$encode = Separator::encode(['foo' => 'Foo', 'bar' => 'Bar']);

output(Separator::decode($encode)->foo);
foo

 

# DecodeArray ( ZN >= 3.0.7 )


Used to decrypt the encrypted data in the array type.

Parameters

String $ data Custom formatting will resolve data.
return Array

Use of

$encode = Separator::encode(['foo' => 'Foo', 'bar' => 'Bar']);

output(Separator::decodeArray($encode)['foo']);
foo