Semantic MediaWiki and related extensions
Static Public Member Functions | List of all members
SMW\HashBuilder Class Reference

Static Public Member Functions

static createFromSemanticData (SemanticData $semanticData)
 
static createFromContent ($hashableContent, $prefix= '')
 
static createFromArray (array $hashableContent, $prefix= '')
 
static createFromSegments ()
 
static createHashIdFromSegments ($title, $namespace, $interwiki= '', $fragment= '')
 
static getHashIdForTitle (Title $title)
 
static getHashIdForDiWikiPage (DIWikiPage $dataItem)
 
static newTitleFromHash ($hash)
 
static newDiWikiPageFromHash ($hash)
 

Detailed Description

Utility class to create unified hash keys for a variety of objects

GNU GPL v2+

Since
2.1
Author
mwjames

Member Function Documentation

static SMW\HashBuilder::createFromArray ( array  $hashableContent,
  $prefix = '' 
)
static
Since
2.5
Parameters
array$hashableContent
string$prefix
Returns
string
static SMW\HashBuilder::createFromContent (   $hashableContent,
  $prefix = '' 
)
static
Since
2.1
Parameters
string | array$hashableContent
string$prefix
Returns
string
static SMW\HashBuilder::createFromSegments ( )
static
Since
2.4
Returns
string
static SMW\HashBuilder::createFromSemanticData ( SemanticData  $semanticData)
static
Since
2.4
Parameters
SemanticData$semanticData
Returns
string
static SMW\HashBuilder::createHashIdFromSegments (   $title,
  $namespace,
  $interwiki = '',
  $fragment = '' 
)
static
Deprecated:
since 2.4, use Hash::createFromSegments
Since
2.1
Parameters
string$title
string$namespace
string$interwiki
string$fragment
Returns
string
static SMW\HashBuilder::getHashIdForDiWikiPage ( DIWikiPage  $dataItem)
static
Since
2.1
Parameters
DIWikiPage$dataItem
Returns
string
static SMW\HashBuilder::getHashIdForTitle ( Title  $title)
static
Since
2.1
Parameters
Title$title
Returns
string
static SMW\HashBuilder::newDiWikiPageFromHash (   $hash)
static
Note
This method does not make additional checks therefore it is assumed that the input hash is derived or generated from HashBuilder::getSegmentedHashId
Since
2.1
Parameters
string
Returns
DIWikiPage|null
static SMW\HashBuilder::newTitleFromHash (   $hash)
static
Since
2.1
Parameters
string$hash
Returns
Title|null

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