Class EasyRdf_Literal_Date

Description

Class that represents an RDF Literal of datatype xsd:date

Located in /EasyRdf/Literal/Date.php (line 47)

EasyRdf_Literal
   |
   --EasyRdf_Literal_Date
Direct descendents
Class Description
EasyRdf_Literal_DateTime Class that represents an RDF Literal of datatype xsd:dateTime
Method Summary
static object EasyRdf_Literal_Date parse (string $value)
object EasyRdf_Literal_Date __construct (mixed $value, [string $lang = null], [string $datatype = null])
integer day ()
string format (string $format)
string getValue (string $format)
integer month ()
integer year ()
Methods
static method parse (line 79)

Parses a string using DateTime and creates a new literal

Example: $date = EasyRdf_Literal_Date::parse('1 January 2011');

  • see: DateTime
  • access: public
static object EasyRdf_Literal_Date parse (string $value)
  • string $value: The date to parse

Redefined in descendants as:
Constructor __construct (line 60)

Constructor for creating a new date literal

If the value is a DateTime object, then it will be converted to the xsd:date format.

  • see: DateTime
  • access: public
object EasyRdf_Literal_Date __construct (mixed $value, [string $lang = null], [string $datatype = null])
  • mixed $value: The value of the literal
  • string $lang: Should be null (literals with a datatype can't have a language)
  • string $datatype: Optional datatype (default 'xsd:date')

Redefinition of:
EasyRdf_Literal::__construct()
Constructor for creating a new literal

Redefined in descendants as:
day (line 129)

Integer representation of the day of the month

  • access: public
integer day ()
format (line 102)

Returns date formatted according to given format

  • see: DateTime::format
  • access: public
string format (string $format)
  • string $format
getValue (line 91)

Returns the date as a PHP DateTime object

  • see: DateTime::format
  • access: public
string getValue (string $format)
  • string $format

Redefinition of:
EasyRdf_Literal::getValue()
Returns the value of the literal.
month (line 120)

Integer representation of the month

  • access: public
integer month ()
year (line 111)

A full integer representation of the year, 4 digits

  • access: public
integer year ()

Inherited Methods

Inherited From EasyRdf_Literal

EasyRdf_Literal::__construct()
EasyRdf_Literal::create()
EasyRdf_Literal::deleteDatatypeMapping()
EasyRdf_Literal::dumpValue()
EasyRdf_Literal::getDatatype()
EasyRdf_Literal::getDatatypeForValue()
EasyRdf_Literal::getDatatypeUri()
EasyRdf_Literal::getLang()
EasyRdf_Literal::getValue()
EasyRdf_Literal::setDatatypeMapping()
EasyRdf_Literal::toArray()
EasyRdf_Literal::__toString()

Documentation generated on Wed, 16 Jan 2013 19:16:37 +0000 by phpDocumentor 1.4.4