class to read profiles from the profiles.ini.php
| package |
jelix |
|---|---|
| subpackage |
utils |
clear()
WARNING: it destroy all objects stored in the pool!
createVirtualProfile(string $category, string $name, array|string $params)
| Throws |
|
|---|
stringthe profile category
stringthe name of the profile
array|stringparameters of the profile. key=parameter name, value=parameter value. we can also indicate a name of an other profile, to create an alias
get(string $category, string $name = '', boolean $noDefault = false) : array
A profile is a section in the profiles.ini.php file. Profiles are belong to a category. Each section names is composed by "category:profilename".
The given name can be a profile name or an alias of a profile. An alias is a parameter name in the category section of the ini file, and the value of this parameter should be a profile name.
| Throws |
|
|---|
stringthe profile category
stringprofile name or alias of a profile name. if empty, use the default profile
booleanif true and if the profile doesn't exist, throw an error instead of getting the default profile
arrayproperties
getFromPool(string $category, string $name) : object|null
stringthe profile category
stringthe name of the profile (value of _name in the retrieved profile)
object|nullthe stored object
getOrStoreInPool(string $category, string $name, string|array $function, $nodefault = false) : object|null
stringthe profile category
stringthe name of the profile (will be given to jProfiles::get)
string|arraythe function name called to retrieved the object. It uses call_user_func.
object|nullthe stored object
loadProfiles()
storeInPool(string $category, string $name, $object)
stringthe profile category
stringthe name of the profile (value of _name in the retrieved profile)
_profiles : array
| var |
|---|
array
_objectPool : array
| var |
array of object |
|---|
array