Semantic MediaWiki and related extensions
Public Member Functions | Static Public Member Functions | List of all members
SMW\Serializers\QueryResultSerializer Class Reference
Collaboration diagram for SMW\Serializers\QueryResultSerializer:
Collaboration graph
[legend]

Public Member Functions

 serialize ($queryResult)
 
 isSerializerFor ($queryResult)
 

Static Public Member Functions

static getSerialization (DataItem $dataItem, $printRequest=null)
 

Detailed Description

Class for serializing SMWDataItem and SMWQueryResult objects to a context independent object consisting of arrays and associative arrays, which can be fed directly to json_encode, the MediaWiki API, and similar serializers.

This class is distinct from SMWSerializer and the SMWExpData object it takes, in that here semantic context is lost.

GNU GPL v2+

Since
1.7
Author
Jeroen De Dauw < jeroe.nosp@m.nded.nosp@m.auw@g.nosp@m.mail.nosp@m..com >

Member Function Documentation

static SMW\Serializers\QueryResultSerializer::getSerialization ( DataItem  $dataItem,
  $printRequest = null 
)
static

Get the serialization for the provided data item.

Since
1.7
Parameters
SMWDataItem$dataItem
Returns
mixed
SMW\Serializers\QueryResultSerializer::isSerializerFor (   $queryResult)
See also
Serializers::isSerializerFor
Since
1.9
SMW\Serializers\QueryResultSerializer::serialize (   $queryResult)
See also
SerializerInterface::serialize
Since
1.9
Returns
array
Exceptions
OutOfBoundsException

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