XOOPS
2.6.0
|
Public Member Functions | |
listChoices ($service) | |
locate ($service) | |
readYamlProviderPrefs () | |
registerChoice ($service, $choices) | |
saveChoice ($service, $choices) | |
Static Public Member Functions | |
static | getInstance () |
Public Attributes | |
const | MODE_CHOICE = 2 |
const | MODE_EXCLUSIVE = 1 |
const | MODE_MULTIPLE = 8 |
const | MODE_PREFERENCE = 4 |
const | PRIORITY_HIGH = 1 |
const | PRIORITY_LOW = 9 |
const | PRIORITY_MEDIUM = 5 |
const | PRIORITY_SELECTED = 0 |
Protected Member Functions | |
__construct () | |
readProviderPrefs () | |
saveProviderPrefs ($providerPrefs) | |
Protected Attributes | |
$providerPrefs = null | |
$services = array() | |
Private Attributes | |
$providerPrefsCacheKey = 'system/provider/prefs' | |
$providerPrefsFilename = 'var/configs/system_provider_prefs.yml' | |
Definition at line 28 of file Manager.php.
|
protected |
__construct
Definition at line 92 of file Manager.php.
References Xoops\Core\Service\Manager\readProviderPrefs().
|
static |
Xoops\Core\Service\Manager::listChoices | ( | $service | ) |
listChoices - list choices availabe for a named service
For MODE_CHOICE services, this can supply an array containing the available choices. This array can be used to construct a user form to make a choice.
string | $service | the service name being set |
Definition at line 233 of file Manager.php.
References Xoops\Core\Service\Manager\locate().
Xoops\Core\Service\Manager::locate | ( | $service | ) |
locate - create a provider object for a named service, locating all contract implementors
string | $service | the service name being set |
Definition at line 246 of file Manager.php.
References $name, $xoops, and Xoops\getInstance().
Referenced by Xoops\Core\Service\Manager\listChoices(), and Xoops\Core\Service\Manager\registerChoice().
|
protected |
readProviderPrefs - read configured provider preferences from cache
Definition at line 144 of file Manager.php.
References Xoops\Core\Service\Manager\$providerPrefs, $xoops, and Xoops\getInstance().
Referenced by Xoops\Core\Service\Manager\__construct(), and Xoops\Core\Service\Manager\saveChoice().
Xoops\Core\Service\Manager::readYamlProviderPrefs | ( | ) |
readYamlProviderPrefs - read configured provider preferences from file
Definition at line 118 of file Manager.php.
References $file, Xoops\Core\Service\Manager\$providerPrefs, $xoops, Xoops\getInstance(), and Xoops\Core\Yaml\read().
Xoops\Core\Service\Manager::registerChoice | ( | $service, | |
$choices | |||
) |
registerChoice - record priority choices for service providers
This registers a temporary choice (i.e. applying user preferences) for the lifetime of this service manager only.
string | $service | the service name being set |
array | $choices | array of priorities for each of the named service providers |
Definition at line 209 of file Manager.php.
References $name, and Xoops\Core\Service\Manager\locate().
Referenced by Xoops\Core\Service\Manager\saveChoice().
Xoops\Core\Service\Manager::saveChoice | ( | $service, | |
$choices | |||
) |
saveChoice - record priority choices for service providers
This registers a permanent choice (i.e. setting system default) that will persist after the lifetime of this service manager.
string | $service | the service name being set |
array | $choices | array of priorities for each of the named service providers |
Definition at line 186 of file Manager.php.
References Xoops\Core\Service\Manager\readProviderPrefs(), Xoops\Core\Service\Manager\registerChoice(), and Xoops\Core\Service\Manager\saveProviderPrefs().
|
protected |
saveProviderPrefs - record array of provider preferences in config file, and update cache
array | $providerPrefs | array of provider preferences to save |
Definition at line 162 of file Manager.php.
References Xoops\Core\Service\Manager\$providerPrefs, $xoops, Xoops\getInstance(), and Xoops\Core\Yaml\save().
Referenced by Xoops\Core\Service\Manager\saveChoice().
|
protected |
Definition at line 77 of file Manager.php.
Referenced by Xoops\Core\Service\Manager\readProviderPrefs(), Xoops\Core\Service\Manager\readYamlProviderPrefs(), and Xoops\Core\Service\Manager\saveProviderPrefs().
|
private |
Definition at line 87 of file Manager.php.
|
private |
Definition at line 82 of file Manager.php.
|
protected |
Definition at line 69 of file Manager.php.
const Xoops\Core\Service\Manager::MODE_CHOICE = 2 |
Service Mode constant - Choice mode where one service from potentially many located services will be used. The service dispatched will be selected by system default.
Definition at line 41 of file Manager.php.
const Xoops\Core\Service\Manager::MODE_EXCLUSIVE = 1 |
Service Mode constant - Exclusive mode where only one located service will be used.
Definition at line 34 of file Manager.php.
Referenced by Xoops\Core\Service\Provider\getProviderMode().
const Xoops\Core\Service\Manager::MODE_MULTIPLE = 8 |
Service Mode constant - Multiple mode where all located services will be dispatched in priority order.
Definition at line 54 of file Manager.php.
const Xoops\Core\Service\Manager::MODE_PREFERENCE = 4 |
Service Mode constant - Choice mode where one service from potentially many located services will be used. The service dispatched will be selected by user preference, or system default if no user valid preference is available.
Definition at line 48 of file Manager.php.
const Xoops\Core\Service\Manager::PRIORITY_HIGH = 1 |
Definition at line 60 of file Manager.php.
const Xoops\Core\Service\Manager::PRIORITY_LOW = 9 |
Definition at line 62 of file Manager.php.
const Xoops\Core\Service\Manager::PRIORITY_MEDIUM = 5 |
Definition at line 61 of file Manager.php.
const Xoops\Core\Service\Manager::PRIORITY_SELECTED = 0 |
Provider priorities
Definition at line 59 of file Manager.php.