ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
Sabre\Xml\Element\Cdata Class Reference

CDATA element. More...

+ Inheritance diagram for Sabre\Xml\Element\Cdata:
+ Collaboration diagram for Sabre\Xml\Element\Cdata:

Public Member Functions

 __construct ($value)
 Constructor. More...
 
 xmlSerialize (Xml\Writer $writer)
 The xmlSerialize metod is called during xml writing. More...
 
- Public Member Functions inherited from Sabre\Xml\XmlSerializable
 xmlSerialize (Writer $writer)
 The xmlSerialize method is called during xml writing. More...
 

Protected Attributes

 $value
 

Detailed Description

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.

Author
Evert Pot (http://evertpot.com/) http://sabre.io/license/ Modified BSD License

Definition at line 20 of file Cdata.php.

Constructor & Destructor Documentation

◆ __construct()

Sabre\Xml\Element\Cdata::__construct (   $value)

Constructor.

Parameters
string$value

Definition at line 34 of file Cdata.php.

References Sabre\Xml\Element\Cdata\$value.

35  {
36  $this->value = $value;
37  }

Member Function Documentation

◆ xmlSerialize()

Sabre\Xml\Element\Cdata::xmlSerialize ( Xml\Writer  $writer)

The xmlSerialize metod is called during xml writing.

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
Returns
void

Definition at line 58 of file Cdata.php.

58  {
59 
60  $writer->writeCData($this->value);
61 
62  }

Field Documentation

◆ $value

Sabre\Xml\Element\Cdata::$value
protected

Definition at line 27 of file Cdata.php.

Referenced by Sabre\Xml\Element\Cdata\__construct().


The documentation for this class was generated from the following file: