Class TextValue
An element representing a text value that may be in a specific language.
Methods summary
public
|
#
__construct( mixed $o = null )
Constructs a TextValue from a (parsed) JSON hash
Constructs a TextValue from a (parsed) JSON hash
Parameters
- $o
- Either an array (JSON) or an XMLReader.
Throws
Exception
|
public
string
|
#
getLang( )
The language of the text value.
The language of the text value.
Returns
string
|
public
|
#
setLang( string $lang )
The language of the text value.
The language of the text value.
Parameters
Returns
$this
|
public
string
|
|
public
|
#
setValue( string $value )
The text value.
Parameters
Returns
$this
|
public
array
|
#
toArray( )
Returns the associative array for this TextValue
Returns the associative array for this TextValue
Returns
array
|
public
string
|
#
toJson( )
Returns the JSON string for this TextValue
Returns the JSON string for this TextValue
Returns
string
|
public
|
#
initFromArray( array $o )
Initializes this TextValue from an associative array
Initializes this TextValue from an associative array
Parameters
|
public
|
#
initFromReader( XMLReader $xml )
Initializes this TextValue from an XML reader.
Initializes this TextValue from an XML reader.
Parameters
- $xml
- The reader to use to initialize this object.
|
public
|
#
writeXmlContents( XMLWriter $writer )
Writes the contents of this TextValue to an XML writer. The startElement is expected to be already provided.
Writes the contents of this TextValue to an XML writer. The startElement is expected to be already provided.
Parameters
|