SMWErrorValue Class Reference
[SMWDataValues]

This datavalue implements error datavalues, a kind of pseudo data value that is used in places where a data value is expected but no more meaningful value could be created. More...

Inherits SMWDataValue.

List of all members.

Public Member Functions

 __construct ($typeid, $errormsg= '', $uservalue= '', $caption=false)
 getShortWikiText ($linked=null)
 Returns a short textual representation for this data value.
 getShortHTMLText ($linker=null)
 Returns a short textual representation for this data value.
 getLongWikiText ($linked=null)
 Return the long textual description of the value, as printed for example in the factbox.
 getLongHTMLText ($linker=null)
 Return the long textual description of the value, as printed for example in the factbox.
 getWikiValue ()
 Return the plain wiki version of the value, or FALSE if no such version is available.
 isValid ()
 Return true if a value was defined and understood by the given type, and false if parsing errors occured or no value was given.

Protected Member Functions

 parseUserValue ($value)
 Initialise the datavalue from the given value string.
 loadDataItem (SMWDataItem $dataItem)


Detailed Description

This datavalue implements error datavalues, a kind of pseudo data value that is used in places where a data value is expected but no more meaningful value could be created.

It is always invalid and never gets stored or exported, but it can help to transport an error message.

Author:
Markus Krötzsch

Definition at line 16 of file SMW_DV_Error.php.


Constructor & Destructor Documentation

SMWErrorValue::__construct ( typeid,
errormsg = '',
uservalue = '',
caption = false 
)

Definition at line 18 of file SMW_DV_Error.php.

References SMWDataValue::addError().


Member Function Documentation

SMWErrorValue::parseUserValue ( value  )  [protected]

Initialise the datavalue from the given value string.

The format of this strings might be any acceptable user input and especially includes the output of getWikiValue().

Parameters:
string $value

Reimplemented from SMWDataValue.

Definition at line 26 of file SMW_DV_Error.php.

References SMWDataValue::addError().

SMWErrorValue::loadDataItem ( SMWDataItem dataItem  )  [protected]

See also:
SMWDataValue::loadDataItem()
Parameters:
$dataitem SMWDataItem
Returns:
boolean

Reimplemented from SMWDataValue.

Definition at line 38 of file SMW_DV_Error.php.

References SMWDataValue::addError(), SMWDataValue::getErrors(), SMWDataValue::getErrorText(), and SMWDataItem::TYPE_ERROR.

SMWErrorValue::getShortWikiText ( linked = null  ) 

Returns a short textual representation for this data value.

If the value was initialised from a user supplied string, then this original string should be reflected in this short version (i.e. no normalisation should normally happen). There might, however, be additional parts such as code for generating tooltips. The output is in wiki text.

The parameter $linked controls linking of values such as titles and should be non-NULL and non-false if this is desired.

Reimplemented from SMWDataValue.

Definition at line 48 of file SMW_DV_Error.php.

Referenced by getShortHTMLText().

SMWErrorValue::getShortHTMLText ( linker = null  ) 

Returns a short textual representation for this data value.

If the value was initialised from a user supplied string, then this original string should be reflected in this short version (i.e. no normalisation should normally happen). There might, however, be additional parts such as code for generating tooltips. The output is in HTML text.

The parameter $linker controls linking of values such as titles and should be some Linker object (or NULL for no linking).

Reimplemented from SMWDataValue.

Definition at line 52 of file SMW_DV_Error.php.

References getShortWikiText().

SMWErrorValue::getLongWikiText ( linked = null  ) 

Return the long textual description of the value, as printed for example in the factbox.

If errors occurred, return the error message The result always is a wiki-source string.

The parameter $linked controls linking of values such as titles and should be non-NULL and non-false if this is desired.

Reimplemented from SMWDataValue.

Definition at line 56 of file SMW_DV_Error.php.

References SMWDataValue::getErrorText().

SMWErrorValue::getLongHTMLText ( linker = null  ) 

Return the long textual description of the value, as printed for example in the factbox.

If errors occurred, return the error message The result always is an HTML string.

The parameter $linker controls linking of values such as titles and should be some Linker object (or NULL for no linking).

Reimplemented from SMWDataValue.

Definition at line 60 of file SMW_DV_Error.php.

References SMWDataValue::getErrorText().

SMWErrorValue::getWikiValue (  ) 

Return the plain wiki version of the value, or FALSE if no such version is available.

The returned string suffices to reobtain the same DataValue when passing it as an input string to setUserValue().

Reimplemented from SMWDataValue.

Definition at line 64 of file SMW_DV_Error.php.

SMWErrorValue::isValid (  ) 

Return true if a value was defined and understood by the given type, and false if parsing errors occured or no value was given.

Returns:
boolean

Reimplemented from SMWDataValue.

Definition at line 68 of file SMW_DV_Error.php.


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

Generated on Thu Feb 9 07:15:40 2012 for Semantic MediaWiki by  doxygen 1.5.6