JsonSimpleXMLElementDecorator
class JsonSimpleXMLElementDecorator implements JsonSerializable (View source)
Class JsonSimpleXMLElementDecorator.
Constants
DEF_DEPTH |
|
Properties
protected SimpleXMLElement | $subject | ||
protected array | $options |
Methods
__construct(SimpleXMLElement $element, bool $useAttributes = true, bool $useText = true, int $depth = self::DEF_DEPTH)
Constructor.
void
useAttributes(bool $bool)
Should use attributes.
void
useText(bool $bool)
Should use text.
void
setDepth(int $depth)
Set depth.
mixed
jsonSerialize()
Specify data which should be serialized to JSON.
Details
__construct(SimpleXMLElement $element, bool $useAttributes = true, bool $useText = true, int $depth = self::DEF_DEPTH)
Constructor.
void
useAttributes(bool $bool)
Should use attributes.
void
useText(bool $bool)
Should use text.
void
setDepth(int $depth)
Set depth.
mixed
jsonSerialize()
Specify data which should be serialized to JSON.