XRL  latest
Simple XML-RPC Library (both client and server)
fpoirotte\XRL\Types\AbstractType Class Reference

A class representing an abstract XML-RPC type. More...

+ Inheritance diagram for fpoirotte\XRL\Types\AbstractType:

Public Member Functions

 __construct ($value)
 
 __toString ()
 
 get ()
 
 set ($value)
 
 write (\XMLWriter $writer,\DateTimeZone $timezone, $stringTag)
 

Static Public Member Functions

static read ($value,\DateTimeZone $timezone=null)
 

Static Protected Member Functions

static parse ($value,\DateTimeZone $timezone=null)
 

Protected Attributes

 $value
 Current value associated with this object.
 

Detailed Description

A class representing an abstract XML-RPC type.

Authors
François Poirotte click.nosp@m.y@er.nosp@m.ebot..nosp@m.net

Definition at line 20 of file AbstractType.php.

Constructor & Destructor Documentation

fpoirotte\XRL\Types\AbstractType::__construct (   $value)

Construct a new instance with some initial value.

Parameters
mixed$valueInitial value.
Exceptions
InvalidArgumentExceptionThe given value is invalid for this type of object.

Definition at line 36 of file AbstractType.php.

References fpoirotte\XRL\Types\AbstractType\$value.

Member Function Documentation

fpoirotte\XRL\Types\AbstractType::__toString ( )

Return a string representation of this object's value.

Return values
stringString representation of this object's value.

Definition at line 81 of file AbstractType.php.

fpoirotte\XRL\Types\AbstractType::get ( )

Return this object's current value.

Return values
mixedThis object's current value.

Definition at line 47 of file AbstractType.php.

References fpoirotte\XRL\Types\AbstractType\$value.

static fpoirotte\XRL\Types\AbstractType::parse (   $value,
\DateTimeZone  $timezone = null 
)
staticprotected

Parse a string into a value compatible with this type.

Parameters
string$valueString to parse.
DateTimeZone$timezoneTimezone to use when converting dates/times.
Return values
mixedA value compatible with this type.

Definition at line 99 of file AbstractType.php.

References fpoirotte\XRL\Types\AbstractType\$value, and fpoirotte\XRL\Types\AbstractType\write().

static fpoirotte\XRL\Types\AbstractType::read (   $value,
\DateTimeZone  $timezone = null 
)
staticfinal

Construct a new instance of the type with the content from some string.

Parameters
string$valueRaw value to parse.
Return values
objectNew object instanciated from the value.
Parameters
DateTimeZone$timezoneTimezone to use when converting dates/times.
Exceptions
InvalidArgumentExceptionThe given value is invalid for this type of object.

Definition at line 69 of file AbstractType.php.

References fpoirotte\XRL\Types\AbstractType\$value.

Referenced by fpoirotte\XRL\Decoder\decodeValue().

fpoirotte\XRL\Types\AbstractType::set (   $value)
abstract

Change the value associated with the object.

Parameters
mixed$valueNew value.
Returns
This method does not return any value.
Exceptions
InvalidArgumentExceptionThe given value is invalid for this type of object.
fpoirotte\XRL\Types\AbstractType::write ( \XMLWriter  $writer,
\DateTimeZone  $timezone,
  $stringTag 
)
abstract

Export this object's value to XML.

Parameters
XMLWriter$writerWriter the value will be exported to.
DateTimeZone$timezoneTimezone to use when exporting dates/times.
bool$stringTagWhether to use <string> tags at all when encoding strings.
Returns
This method does not return any value.

Referenced by fpoirotte\XRL\Types\AbstractType\parse().


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