Documentation

Cdata
in package
implements XmlSerializable

CDATA element.

This element allows you to easily inject CDATA.

Note that we strongly recommend avoiding CDATA nodes, unless you definitely know what you're doing, or you're working with unchangable systems that require CDATA.

Tags
copyright

Copyright (C) 2009-2015 fruux GmbH (https://fruux.com/).

author

Evert Pot (http://evertpot.com/)

license

http://sabre.io/license/ Modified BSD License

Interfaces, Classes and Traits

XmlSerializable
Objects implementing XmlSerializable can control how they are represented in Xml.

Table of Contents

$value  : string
CDATA element value.
__construct()  : mixed
Constructor.
xmlSerialize()  : mixed
The xmlSerialize metod is called during xml writing.

Properties

$value

CDATA element value.

protected string $value

Methods

__construct()

Constructor.

public __construct(string $value) : mixed
Parameters
$value : string
Return values
mixed

xmlSerialize()

The xmlSerialize metod is called during xml writing.

public xmlSerialize(Writer $writer) : mixed

Use the $writer argument to write its own xml serialization.

An important note: do not create a parent element. Any element implementing XmlSerializble should only ever write what's considered its 'inner xml'.

The parent of the current element is responsible for writing a containing element.

This allows serializers to be re-used for different element names.

If you are opening new elements, you must also close them again.

Parameters
$writer : Writer
Return values
mixed

Search results