BlueSpice MediaWiki REL1_27
 All Classes Namespaces Files Functions Variables Groups Pages
SMWURIValue Class Reference
Inheritance diagram for SMWURIValue:
Collaboration diagram for SMWURIValue:

Public Member Functions

 __construct ($typeid)
 
 getShortWikiText ($linked=null)
 
 getShortHTMLText ($linker=null)
 
 getLongWikiText ($linked=null)
 
 getLongHTMLText ($linker=null)
 
 getWikiValue ()
 
 getURI ()
 
 getURL ()
 
- Public Member Functions inherited from SMWDataValue
 __construct ($typeid)
 
 setUserValue ($value, $caption=false, $approximateValue=false)
 
 setDataItem (SMWDataItem $dataItem)
 
 setProperty (SMWDIProperty $property)
 
 getProperty ()
 
 setContextPage (SMWDIWikiPage $contextPage=null)
 
 getContextPage ()
 
 setOptions (Options $options)
 
 setOption ($key, $value)
 
 getOptionValueFor ($key)
 
 isEnabledFeature ($feature)
 
 setCaption ($caption)
 
 getCaption ()
 
 getPreferredCaption ()
 
 addInfolink (SMWInfolink $link)
 
 setOutputFormat ($formatString)
 
 getOutputFormat ()
 
 addError ($error)
 
 addErrorMsg ($parameters, $type=null, $language=null)
 
 clearErrors ()
 
 getQueryDescription ($value)
 
 getDataValueFormatter ()
 
 getPropertySpecificationLookup ()
 
 getDataItem ()
 
 __toString ()
 
 getShortWikiText ($linked=null)
 
 getShortHTMLText ($linker=null)
 
 getLongWikiText ($linked=null)
 
 getLongHTMLText ($linker=null)
 
 getShortText ($outputformat, $linker=null)
 
 getLongText ($outputformat, $linker=null)
 
 getInfolinkText ($outputformat, $linker=null)
 
 getWikiValue ()
 
 getTypeID ()
 
 disableServiceLinks ()
 
 getInfolinks ()
 
 getHash ()
 
 isNumeric ()
 
 isValid ()
 
 canUse ()
 
 setExtraneousFunctions (array $extraneousFunctions)
 
 getExtraneousFunctionFor ($name, array $parameters=array())
 
 getErrorText ()
 
 getErrors ()
 

Protected Member Functions

 parseUserValue ($value)
 
 loadDataItem (SMWDataItem $dataItem)
 
 getServiceLinkParams ()
 
 getUriDataitem ()
 
 makeNonlinkedWikiText ($url)
 
- Protected Member Functions inherited from SMWDataValue
 parseUserValue ($value)
 
 loadDataItem (SMWDataItem $dataItem)
 
 getServiceLinkParams ()
 
 checkAllowedValues ()
 
 convertDoubleWidth ($value)
 

Static Protected Member Functions

static isValidTelURI ($s)
 

Protected Attributes

 $m_wikitext
 
- Protected Attributes inherited from SMWDataValue
 $m_dataitem
 
 $m_property = null
 
 $m_contextPage = null
 
 $m_caption
 
 $m_typeid
 
 $m_outformat = false
 
 $approximateValue = false
 

Additional Inherited Members

- Static Public Member Functions inherited from SMWDataValue
static prepareValue (&$value, &$comparator)
 
- Public Attributes inherited from SMWDataValue
const OPT_USER_LANGUAGE = 'user.language'
 
const OPT_CONTENT_LANGUAGE = 'content.language'
 

Detailed Description

This datavalue implements URL/URI/ANNURI/PHONE/EMAIL datavalues suitable for defining the respective types of properties.

Author
Nikolas Iwan
Markus Krötzsch
Bug:
Correctly create safe HTML and Wiki text.

Member Function Documentation

SMWURIValue::getUriDataitem ( )
protected

Helper function to get the current dataitem, or some dummy URI dataitem if the dataitem was not set. This makes it easier to write code that avoids errors even if the data was not initialized properly.

Returns
SMWDIUri
SMWURIValue::getURL ( )

Get a URL for hyperlinking this URI, or the empty string if this URI is not hyperlinked in MediaWiki.

Returns
string
static SMWURIValue::isValidTelURI (   $s)
staticprotected

Returns true if the argument is a valid RFC 3966 phone number. Only global phone numbers are supported, and no full validation of parameters (appended via ;param=value) is performed.

SMWURIValue::loadDataItem ( SMWDataItem  $dataItem)
protected
See Also
SMWDataValue::loadDataItem()
Parameters
$dataitemSMWDataItem
Returns
boolean
SMWURIValue::makeNonlinkedWikiText (   $url)
protected

Helper function that changes a URL string in such a way that it can be used in wikitext without being turned into a hyperlink, while still displaying the same characters. The use of <nowiki> is avoided, since the resulting strings may be inserted during parsing, after this has been stripped.

Since
1.8
SMWURIValue::parseUserValue (   $value)
protected

NOTE: we do not support raw [ (%5D) and ] (%5E), although they are needed for ldap:// (but rarely in a wiki) NOTE: "+" gets encoded, as it is interpreted as space by most browsers when part of a URL; this prevents tel: from working directly, but we have a datatype for this anyway.

TODO: introduce error-message for "bad" phone number

TODO: introduce error-message for "bad" email


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