clear the loaded profiles to force to reload the profiles file.
WARNING: it destroy all objects stored in the pool!
static void
clear
()
create a temporary new profile
static void
createVirtualProfile
(string $category, string $name, array|string $params)
-
string
$category: the profile category
-
string
$name: the name of the profile
-
array|string
$params: parameters of the profile. key=parameter name, value=parameter value. we can also indicate a name of an other profile, to create an alias
load properties of a profile.
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.
static array
get
(string $category, [string $name = ''], [boolean $noDefault = false])
-
string
$category: the profile category
-
string
$name: profile name or alias of a profile name. if empty, use the default profile
-
boolean
$noDefault: if true and if the profile doesn't exist, throw an error instead of getting the default profile
store an object in the objects pool, corresponding to a profile
static object|null
getFromPool
(string $category, string $name)
-
string
$category: the profile category
-
string
$name: the name of the profile (value of _name in the retrieved profile)
add an object in the objects pool, corresponding to a profile
or store the object retrieved from the function, which accepts a profile as parameter (array)
static object|null
getOrStoreInPool
(string $category, string $name, string|array $function, [ $nodefault = false], boolean $noDefault)
-
string
$category: the profile category
-
string
$name: the name of the profile (will be given to jProfiles::get)
-
string|array
$function: the function name called to retrieved the object. It uses call_user_func.
-
boolean
$noDefault: if true and if the profile doesn't exist, throw an error instead of getting the default profile
-
$nodefault
static void
loadProfiles
()
add an object in the objects pool, corresponding to a profile
static void
storeInPool
(string $category, string $name, $object, object $obj)
-
string
$category: the profile category
-
string
$name: the name of the profile (value of _name in the retrieved profile)
-
object
$obj: the object to store
-
$object