Moodle APIs  3.8
Moodle 3.8.6 (Build: 20201109)
Static Public Member Functions | Static Protected Attributes | List of all members
core_search\document_factory Class Reference

Search document factory. More...

Static Public Member Functions

static clean_static ()
 Clears static vars. More...
 
static instance ($itemid, $componentname, $areaname, $engine=false)
 Returns the appropiate document object as it depends on the engine. More...
 

Static Protected Attributes

static array $docclassnames = array()
 The document class used by search engines. More...
 

Detailed Description

Search document factory.

License
http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later

Member Function Documentation

◆ clean_static()

static core_search\document_factory::clean_static ( )
static

Clears static vars.

Return values
void

◆ instance()

static core_search\document_factory::instance (   $itemid,
  $componentname,
  $areaname,
  $engine = false 
)
static

Returns the appropiate document object as it depends on the engine.

Parameters
int$itemidDocument itemid
string$componentnameDocument component name
string$areanameDocument area name
core_search\engine$engineFalls back to the search engine in use.
Return values
core_search

Member Data Documentation

◆ $docclassnames

array core_search\document_factory::$docclassnames = array()
staticprotected

The document class used by search engines.

Defined as an array to prevent unexpected caching issues, it should only contain one search engine as only one search engine will be used during a request. This might change during testing, remember to use document_factory::clean_statics in that case.


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