Semantic MediaWiki and related extensions
Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
SMWDIUri Class Reference
Inheritance diagram for SMWDIUri:
Inheritance graph
[legend]
Collaboration diagram for SMWDIUri:
Collaboration graph
[legend]

Public Member Functions

 __construct ( $scheme, $hierpart, $query, $fragment, $strict=true)
 
 getDIType ()
 
 getURI ()
 
 getScheme ()
 
 getHierpart ()
 
 getQuery ()
 
 getFragment ()
 
 getSortKey ()
 
 getSerialization ()
 
 equals (SMWDataItem $di)
 
- Public Member Functions inherited from SMWDataItem
 getDIType ()
 
 getSortKey ()
 
 equals (SMWDataItem $di)
 
 getSortKeyDataItem ()
 
 getSerialization ()
 
 getSha1 ()
 
 getHash ()
 
 __toString ()
 
 setOption ( $key, $value)
 
 getOption ( $key, $default=null)
 

Static Public Member Functions

static doUnserialize ( $serialization)
 
- Static Public Member Functions inherited from SMWDataItem
static newFromSerialization ( $diType, $serialization)
 
static getDataItemClassNameForId ( $diType)
 

Protected Attributes

 $m_scheme
 
 $m_hierpart
 
 $m_query
 
 $m_fragment
 

Additional Inherited Members

- Public Attributes inherited from SMWDataItem
const TYPE_NOTYPE = 0
 Data item ID that can be used to indicate that no data item class is appropriate.
 
const TYPE_NUMBER = 1
 Data item ID for SMWDINumber.
 
const TYPE_BLOB = 2
 Data item ID for SMWDIBlob.
 
const TYPE_BOOLEAN = 4
 Data item ID for SMWDIBoolean.
 
const TYPE_URI = 5
 Data item ID for SMWDIUri.
 
const TYPE_TIME = 6
 Data item ID for SMWDITimePoint.
 
const TYPE_GEO = 7
 Data item ID for SMWDIGeoCoord.
 
const TYPE_CONTAINER = 8
 Data item ID for SMWDIContainer.
 
const TYPE_WIKIPAGE = 9
 Data item ID for SMWDIWikiPage.
 
const TYPE_CONCEPT = 10
 Data item ID for SMWDIConcept.
 
const TYPE_PROPERTY = 11
 Data item ID for SMWDIProperty.
 
const TYPE_ERROR = 12
 Data item ID for SMWDIError.
 

Detailed Description

This class implements URI data items.

Since
1.6
Author
Markus Krötzsch

Constructor & Destructor Documentation

◆ __construct()

SMWDIUri::__construct (   $scheme,
  $hierpart,
  $query,
  $fragment,
  $strict = true 
)

URI to be defined by its components:

  • scheme (e.g. "html"),
  • hierpart following the "scheme:" (e.g. "//username@example.org/path) - query (e.g. "q=Search+term", and - fragment (e.g. "section-one").

The complete URI with these examples would be http://username@example.org/path?q=Search+term#section-one

    userinfo    host    port
    ┌─┴────┐ ┌────┴────┐ ┌┴┐

https://john.doe@example.com:123/search?name=ferret#nose └─┬─┘ └───────┬────────────────┘└──┬──┘└──┬───────┘└┬─┘ scheme authority path query fragment ┌─┴┐┌──────────────────────────────┴──────────────┐ urn:oasis:names:specification:docbook:dtd:xml:4.1.2

Parameters
$schemestring for the scheme
$hierpartstring for the "hierpart"
$querystring for the query
$fragmentstring for the fragment
Todo:
Implement more validation here.

Member Function Documentation

◆ doUnserialize()

static SMWDIUri::doUnserialize (   $serialization)
static

Create a data item from the provided serialization string and type ID.

Returns
SMWDIUri

◆ getSortKey()

SMWDIUri::getSortKey ( )
Since
1.6
Returns
string

◆ getURI()

SMWDIUri::getURI ( )
Todo:
This should be changed to the spelling getUri().

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

About | General disclaimer | Privacy policy