class XmlSerializer extends Serialization (View source)

XML serializer.

Properties

protected $model from Serialization
protected $options from Serialization
protected $attributes from Serialization
static $DATETIME_FORMAT The default format to serialize DateTime objects to. from Serialization
protected boolean $includes_with_class_name_element Set this to true if the serializer needs to create a nested array keyed on the name of the included classes such as for xml serialization. from Serialization

Methods

__construct(Model $model, array $options)

Constructs a {@link Serialization} object.

options_to_a($key)

No description

array
to_a()

Returns the attributes array.

string
__toString()

Returns the serialized object as a string.

string
to_s()

Performs the serialization.

Details

Serialization __construct(Model $model, array $options)

Constructs a {@link Serialization} object.

Parameters

Model $model The model to serialize
array $options &$options Options for serialization

Return Value

Serialization

final protected options_to_a($key)

Parameters

$key

final array to_a()

Returns the attributes array.

Return Value

array

final string __toString()

Returns the serialized object as a string.

Return Value

string

See also

to_s

string to_s()

Performs the serialization.

Return Value

string