Lizmap Web Client Master

AppContextInterface

Interface that will be implemented to get Jelix infos so we can either send Jelix's real infos either custom infos to make our own tests.

Table of Contents

Methods

aclCheck()  : bool
says if the current user has the given right.
aclGroupsIdByUser()  : array<string|int, mixed>
Retrieve the list of group the given user is member of in the acl system.
aclUserGroupsId()  : array<string|int, mixed>
Retrieve the list of groups id, the current user is member of, in the acl system.
aclUserGroupsInfo()  : array<string|int, mixed>
Retrieve the list of groups properties, the current user is member of, in the acl system.
aclUserPrivateGroup()  : string
Get the private group for the current user or for the given login in the acl system.
aclUserPublicGroupsId()  : array<string|int, mixed>
Retrieve the list of public group the given user is member of in the acl system.
appConfig()  : object
Configuration of the application.
appConfigPath()  : mixed
Returns the configuration file path.
appVarPath()  : mixed
Returns the app var path.
clearCache()  : mixed
Deletes data from cache.
createDaoRecord()  : mixed
Creates a new Record in the Dao.
createJelixForm()  : jFormsBase
Gets the form object corresponding to the given selector.
createVirtualProfile()  : mixed
Create a profile to be used with jDb or jCache.
eventNotify()  : object
Send an application event.
flushCache()  : mixed
Flushes data from the cache.
getCache()  : mixed
get the cached value of the given key.
getCacheDriver()  : mixed
Returns the cache driver corresponding to the profile.
getClassService()  : mixed
Returns a class instance.
getCoord()  : mixed
Returns a jCoordinator object.
getDbConnection()  : object
Retrieve a connection object to query a database.
getFormPath()  : string
Returns the path to the json form folder.
getFullUrl()  : mixed
Returns the absolute Url.
getIniModifier()  : mixed
Returns a the IniFileModifier corresponding to the ini file.
getJelixDao()  : jDaoFactoryBase
Return a dao factory. Specific to Jelix.
getLocale()  : string
Get a string in a specific language.
getProfile()  : array<string|int, mixed>
Return the properties of a profile.
getTileCaps()  : mixed
Calls the lizmapTiler::getTileCapabilities method.
getTpl()  : mixed
Returns a new jTpl Object.
getUrl()  : mixed
Returns the URL corresponding to the Jelix Selector.
getUserSession()  : object
Informations of the current authenticated user.
logException()  : mixed
Log an Exception.
logMessage()  : mixed
Log a message.
normalizeCacheKey()  : string
return the normalized value of a cache key, to be used with getCache.
setCache()  : mixed
Set a data in the cache.
UserIsConnected()  : bool
Indicate if the current user is authenticated.

Methods

aclCheck()

says if the current user has the given right.

public aclCheck(string $right[, string $resource = null ]) : bool
Parameters
$right : string

the key of the right to check

$resource : string = null

the id of a resource if any

Return values
bool

true if the right is ok

aclGroupsIdByUser()

Retrieve the list of group the given user is member of in the acl system.

public aclGroupsIdByUser(string $login) : array<string|int, mixed>
Parameters
$login : string

The user's login

Return values
array<string|int, mixed>

list of group id

aclUserGroupsId()

Retrieve the list of groups id, the current user is member of, in the acl system.

public aclUserGroupsId() : array<string|int, mixed>
Return values
array<string|int, mixed>

list of group id

aclUserGroupsInfo()

Retrieve the list of groups properties, the current user is member of, in the acl system.

public aclUserGroupsInfo() : array<string|int, mixed>
Return values
array<string|int, mixed>

list of groups objects

aclUserPrivateGroup()

Get the private group for the current user or for the given login in the acl system.

public aclUserPrivateGroup([string $login = null ]) : string
Parameters
$login : string = null

The user's login

Return values
string

the id of the private group

aclUserPublicGroupsId()

Retrieve the list of public group the given user is member of in the acl system.

public aclUserPublicGroupsId([string $login = null ]) : array<string|int, mixed>
Parameters
$login : string = null

The user's login

Return values
array<string|int, mixed>

list of public group id

appConfig()

Configuration of the application.

public appConfig() : object
Return values
object

configuration parameters into properties of an object

appConfigPath()

Returns the configuration file path.

public appConfigPath([string $file = '' ]) : mixed
Parameters
$file : string = ''

The configuration file

appVarPath()

Returns the app var path.

public appVarPath([string $file = '' ]) : mixed
Parameters
$file : string = ''

The var file

clearCache()

Deletes data from cache.

public clearCache(string $key[, string $profile = '' ]) : mixed
Parameters
$key : string

The cache key

$profile : string = ''

The cache profile

createDaoRecord()

Creates a new Record in the Dao.

public createDaoRecord(string $dao[, string $profile = '' ]) : mixed
Parameters
$dao : string

The Jelix dao selector

$profile : string = ''

The profile to use

createJelixForm()

Gets the form object corresponding to the given selector.

public createJelixForm(string $formSel[, string $formId = null ]) : jFormsBase

specific to Jelix

Parameters
$formSel : string

the selector of the xml jform file

$formId : string = null

the id of the new instance (an id of a record for example)

Return values
jFormsBase

createVirtualProfile()

Create a profile to be used with jDb or jCache.

public createVirtualProfile(string $category, string $name, array<string|int, mixed> $params) : mixed
Parameters
$category : string

The profile category to create

$name : string

The profile name

$params : array<string|int, mixed>

The parameters of the profile

eventNotify()

Send an application event.

public eventNotify(string $eventName[, array<string|int, mixed> $params = array() ]) : object
Parameters
$eventName : string

The name of the event

$params : array<string|int, mixed> = array()

the parameters of the event

Return values
object

flushCache()

Flushes data from the cache.

public flushCache([string $profile = '' ]) : mixed
Parameters
$profile : string = ''

The cache profile

getCache()

get the cached value of the given key.

public getCache(string $key[, string $profile = '' ]) : mixed
Parameters
$key : string

the cache key

$profile : string = ''

the name of the cache type

Return values
mixed

the value corresponding to the current cache, or null if there is no cache

getCacheDriver()

Returns the cache driver corresponding to the profile.

public getCacheDriver(string $profile) : mixed
Parameters
$profile : string

The profile name

getClassService()

Returns a class instance.

public getClassService(string $selector) : mixed
Parameters
$selector : string

The jelix class selector

getDbConnection()

Retrieve a connection object to query a database.

public getDbConnection([string $profile = '' ]) : object
Parameters
$profile : string = ''

The profile to use, if empty, use the default one

Return values
object

getFormPath()

Returns the path to the json form folder.

public getFormPath() : string
Return values
string

the path

getFullUrl()

Returns the absolute Url.

public getFullUrl(string $selector[, array<string|int, mixed> $params = array() ]) : mixed
Parameters
$selector : string

The Jelix selector of the Url

$params : array<string|int, mixed> = array()

an associative array with the parameters of the Url

getIniModifier()

Returns a the IniFileModifier corresponding to the ini file.

public getIniModifier(string $ini) : mixed
Parameters
$ini : string

The ini file

getJelixDao()

Return a dao factory. Specific to Jelix.

public getJelixDao(string $daoKey[, string $profile = '' ]) : jDaoFactoryBase
Parameters
$daoKey : string

the identifier of the dao factory you want to use

$profile : string = ''

the profile name for the db connection

Return values
jDaoFactoryBase

getLocale()

Get a string in a specific language.

public getLocale(string $key[, array<string|int, mixed> $variables = array() ]) : string
Parameters
$key : string

The key corresponding to the string you want to get

$variables : array<string|int, mixed> = array()

values to replace in the localized string

Return values
string

the translated string

getProfile()

Return the properties of a profile.

public getProfile(string $category[, string $name = '' ][, bool $noDefault = false ]) : array<string|int, mixed>

instead of getting the default profile

Parameters
$category : string

The profile category

$name : string = ''

the profile name

$noDefault : bool = false

If true and if the profile doesn't exist, throw an error

Return values
array<string|int, mixed>

properties

getUrl()

Returns the URL corresponding to the Jelix Selector.

public getUrl(string $selector) : mixed
Parameters
$selector : string

The Jelix selector

getUserSession()

Informations of the current authenticated user.

public getUserSession() : object
Return values
object

the user properties

logException()

Log an Exception.

public logException(Exception $exception[, string $cat = 'default' ]) : mixed
Parameters
$exception : Exception

The exception to log

$cat : string = 'default'

The category of the logged Exception

logMessage()

Log a message.

public logMessage(mixed $message[, string $cat = 'default' ]) : mixed
Parameters
$message : mixed

The message to log

$cat : string = 'default'

The category of the logged message

normalizeCacheKey()

return the normalized value of a cache key, to be used with getCache.

public normalizeCacheKey(string $key) : string
Parameters
$key : string
Return values
string

setCache()

Set a data in the cache.

public setCache(string $key, mixed $value[, mixed $ttl = null ][, string $profile = '' ]) : mixed
Parameters
$key : string

The cache key

$value : mixed

The data to store in the cache

$ttl : mixed = null

data time expiration

$profile : string = ''

the cache profile to use

UserIsConnected()

Indicate if the current user is authenticated.

public UserIsConnected() : bool
Return values
bool

true if yes


        
On this page

Search results