Zeta Components Manual :: Docs For Class ezcSearchXmlManager
Search::ezcSearchXmlManager
Class ezcSearchXmlManager
Handles document type definitions in XML format.
Each definition must be in a separate file in the directory specified to the constructor. The filename must be the same as the lowercase name of the document type with .xml appended. Each file should return the definition of one document type.
Example exampleclass.xml:
- <?xml version="1.0" charset="utf-8"?>
- <document>
- <field type="id">id</field>
- <field type="string" boost="2">title</field>
- <field type="text">description</field>
- </document>
Source for this file: /Search/src/managers/xml_manager.php
Implements interfaces:
Version: | //autogen// |
Method Summary
public ezcSearchXmlManager |
__construct(
$dir
)
Constructs a new XML manager that will look for search document definitions in the directory $dir. |
public ezcSearchDocumentDefinition |
fetchDefinition(
$type
)
Returns the definition of the search document with the type $type. |
Methods
__construct
ezcSearchXmlManager
__construct(
string
$dir
)
Constructs a new XML manager that will look for search document definitions in the directory $dir.
Parameters:
Name | Type | Description |
---|---|---|
$dir |
string |
fetchDefinition
ezcSearchDocumentDefinition
fetchDefinition(
string
$type
)
Returns the definition of the search document with the type $type.
Parameters:
Name | Type | Description |
---|---|---|
$type |
string |
Exceptions:
Type | Description |
---|---|
ezcSearchDefinitionInvalidException |
if the definition does not have an "idProperty" attribute. |
ezcSearchDefinitionNotFoundException |
if no such definition can be found. |
Implementation of:
Method | Description |
---|---|
ezcSearchDefinitionManager::fetchDefinition() |
Returns the definition of the document type $type. |
Documentation generated by phpDocumentor 1.4.3