MLPHP


MLPHP\Extracts
MarkLogic/MLPHP/Extracts.php at line 29

Class Extracts

Extracts

public class Extracts

Represents a set of metadata extracts in a search options node.

Author:
Mike Wooldridge
Todo:
Replace deprecated extract-metadata functionality with extract-document-data
See Also:
http://docs.marklogic.com/guide/rest-dev/appendixb#id_94425

Constructor Summary
void

__construct()

Create an Extracts object.

Method Summary
void

addConstraints(array|string constraints)

Add constraint metadata.

void

addQName(string element, string ns, string attribute, string attributeNs)

Add QName metadata.

void

getExtractsAsElem(DOMDocument dom)

Get the metadata extracts as a DOMElement object.

Constructor Detail

MarkLogic/MLPHP/Extracts.php at line 39

__construct

public void __construct()

Create an Extracts object.

See Also:
http://docs.marklogic.com/search:search#opt-extract-metadata

Method Detail

MarkLogic/MLPHP/Extracts.php at line 49

addConstraints

public void addConstraints(array|string constraints)

Add constraint metadata.

Parameters:
constraints - An array of constraint names or a constraint name.

MarkLogic/MLPHP/Extracts.php at line 67

addQName

public void addQName(string element, string ns, string attribute, string attributeNs)

Add QName metadata.

Todo:
Defining extract as QName not working
See Also:
https://github.com/marklogic/mlphp/issues/6
Parameters:
element - An element name.
ns - An element namespace.
attribute - An attribute name.
attributeNs - An attribute namespace.

MarkLogic/MLPHP/Extracts.php at line 77

getExtractsAsElem

public void getExtractsAsElem(DOMDocument dom)

Get the metadata extracts as a DOMElement object.

Parameters:
dom - The DOMDocument object in which to create the element.

MLPHP