CirrusSearch
Elasticsearch-powered search for MediaWiki
Loading...
Searching...
No Matches
CirrusSearch\Profile\ArrayProfileRepository Class Reference

Simple profile repository backed by a PHP array. More...

+ Inheritance diagram for CirrusSearch\Profile\ArrayProfileRepository:
+ Collaboration diagram for CirrusSearch\Profile\ArrayProfileRepository:

Public Member Functions

 repositoryType ()
 The repository type.
 
 repositoryName ()
 The repository name.
 
 getProfile ( $name)
 Load a profile named $name.
 
 hasProfile ( $name)
 Check if a profile named $name exists in this repository.
 
 listExposedProfiles ()
 

Static Public Member Functions

static fromArray ( $repoType, $repoName, array $profiles)
 
static lazyLoaded ( $repoType, $repoName, callable $loader)
 Lazy loaded array using a callback.
 
static fromFile ( $repoType, $repoName, $phpFile)
 Lazy loaded array by including a php file.
 

Detailed Description

Simple profile repository backed by a PHP array.

Member Function Documentation

◆ fromArray()

static CirrusSearch\Profile\ArrayProfileRepository::fromArray ( $repoType,
$repoName,
array $profiles )
static
Parameters
string$repoType
string$repoName
array$profiles
Returns
ArrayProfileRepository

◆ fromFile()

static CirrusSearch\Profile\ArrayProfileRepository::fromFile ( $repoType,
$repoName,
$phpFile )
static

Lazy loaded array by including a php file.

NOTE: $phpFile will be loaded using PHP's require function

Parameters
string$repoType
string$repoName
string$phpFile
Returns
ArrayProfileRepository

◆ getProfile()

CirrusSearch\Profile\ArrayProfileRepository::getProfile ( $name)

Load a profile named $name.

Parameters
string$name
Returns
array|null the profile data or null if not found

Implements CirrusSearch\Profile\SearchProfileRepository.

◆ hasProfile()

CirrusSearch\Profile\ArrayProfileRepository::hasProfile ( $name)

Check if a profile named $name exists in this repository.

Parameters
string$name
Returns
bool

Implements CirrusSearch\Profile\SearchProfileRepository.

◆ lazyLoaded()

static CirrusSearch\Profile\ArrayProfileRepository::lazyLoaded ( $repoType,
$repoName,
callable $loader )
static

Lazy loaded array using a callback.

Parameters
string$repoType
string$repoName
callable$loader
Returns
ArrayProfileRepository

◆ listExposedProfiles()

CirrusSearch\Profile\ArrayProfileRepository::listExposedProfiles ( )

◆ repositoryName()

CirrusSearch\Profile\ArrayProfileRepository::repositoryName ( )

The repository name.

Returns
string

Implements CirrusSearch\Profile\SearchProfileRepository.

◆ repositoryType()

CirrusSearch\Profile\ArrayProfileRepository::repositoryType ( )

The repository type.

Returns
string

Implements CirrusSearch\Profile\SearchProfileRepository.


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