Constants

ACTION_DESCRIPTORS_CONTAINER_NAME

ACTION_DESCRIPTORS_CONTAINER_NAME

Session container for action descriptors

Properties

$_defaultTranslationLanguage

$_defaultTranslationLanguage : 

Type

$_config

$_config : \Fuman_Config

Fuman_Config

Type

\Fuman_Config

$_factory

$_factory : \Fuman_Factory

Fuman_Factory

Type

\Fuman_Factory

$_databases

$_databases : array

List of {@link Fuman_Db_Abstract}

Format: connectionName => Fuman_Db_Abstract

Type

array

$_fumanTables

$_fumanTables : array

List of {@link Fuman_Table}

Format: uniqueNameOfTable => Fuman_Table

Type

array

$_allTablesLoaded

$_allTablesLoaded : 

Type

$_lazyLoadedTables

$_lazyLoadedTables : 

Type

$_applicationListeners

$_applicationListeners : array<mixed,\Fuman_Application_Listener>

Type

array<mixed,\Fuman_Application_Listener>

$_request

$_request : \Fuman_Request

Fuman_Request

Type

\Fuman_Request

$_session

$_session : \Fuman_Session

Fuman_Session

Type

\Fuman_Session

$_runtimeSession

$_runtimeSession : \Fuman_Session

Fuman_Session

Type

\Fuman_Session

$_actionDescriptors

$_actionDescriptors : array<mixed,\Fuman_Action_Descriptor>

List of stdClass which are describing an action. {@link Fuman_Registry::describeAction($actionClassName)}

Type

array<mixed,\Fuman_Action_Descriptor>

$_actionDescriptorCacheType

$_actionDescriptorCacheType : 

Type

$_client

$_client : \Fuman_Client

Fuman_Client

Type

\Fuman_Client

$_rtlLanguages

$_rtlLanguages : 

Type

Methods

getDbConfig()

getDbConfig(string|null  $name = null) : \stdClass|null

Gets config for a database name

Parameters

string|null $name

Returns

\stdClass|null

hasDb()

hasDb(string|null  $name = null) : boolean

Returns true when db isset

Parameters

string|null $name

Returns

boolean

getDb()

getDb(string|null  $name = null) : \Fuman_Db_Abstract

Returns a {@link Fuman_Db_Abstract} by name. {@link Fuman_Db_Abstract} which are not added yet, are beeing instantiated with information from {@link Fuman_Config}

Parameters

string|null $name

Throws

\Fuman_Exception

Returns

\Fuman_Db_Abstract

getConfiguredDbNames()

getConfiguredDbNames() : array

Gets all configured databases

Returns

array

setApplication()

setApplication(\Fuman_Application_Abstract  $application) : void

Set Fuman_Application

Parameters

\Fuman_Application_Abstract $application

setRequest()

setRequest(\Fuman_Request  $request) : void

Set Fuman_Request

Parameters

\Fuman_Request $request

getRequest()

getRequest() : \Fuman_Request

Get Fuman_Request

Returns

\Fuman_Request

getSession()

getSession() : \Fuman_Session

Return Fuman_Session

Returns

\Fuman_Session

getRuntimeSession()

getRuntimeSession() : \Fuman_Session

Gets runtime session (this is a non configurable session used for config caching, .

..)

Returns

\Fuman_Session

setRuntimeSession()

setRuntimeSession(\Fuman_Session  $session) 

Sets runtime session

Parameters

\Fuman_Session $session

addApplicationListener()

addApplicationListener(\Fuman_Application_Listener  $listener, integer  $priority) : void

Adds application listener

Parameters

\Fuman_Application_Listener $listener
integer $priority

getApplicationListeners()

getApplicationListeners() : array<mixed,\Fuman_Application_Listener>

Returns

array<mixed,\Fuman_Application_Listener>

addTableListener()

addTableListener(\Fuman_Registry_TableListener  $listener) : void

Adds table listener

Parameters

\Fuman_Registry_TableListener $listener

removeTableListener()

removeTableListener(\Fuman_Registry_TableListener  $listener) : void

Removes table listener

Parameters

\Fuman_Registry_TableListener $listener

hasTable()

hasTable(string  $uniqueName) : boolean

Returns true when {@link Fuman_Table} with $tableUniqueName is set

Parameters

string $uniqueName

Returns

boolean

addTable()

addTable(\Fuman_Table  $table) : void

Add {@link Fuman_Table}

Parameters

\Fuman_Table $table

removeTable()

removeTable(string  $tableUniqueName) : void

Remove table

Parameters

string $tableUniqueName

registerLazyLoadedTable()

registerLazyLoadedTable(string  $uniqueName, string  $className, boolean  $overwrite = false) : void

Lazy loaded tables will be instantiated on demand in getTable/hasTable

Parameters

string $uniqueName
string $className
boolean $overwrite

overwrite existing className

getTable()

getTable(string  $uniqueName, boolean|null  $autoCreate = null) : \Fuman_Table

Returns a Fuman Table

Parameters

string $uniqueName
boolean|null $autoCreate

(if value is null the boolean of Application->isReady will be used as default)

Throws

\Fuman_Exception

Returns

\Fuman_Table

getTables()

getTables(boolean  $includeLazyLoaded = false) : array<mixed,\Fuman_Table>

Returns all {@link Fuman_Table} which are added to {@link Fuman_Registry}

Parameters

boolean $includeLazyLoaded

Returns

array<mixed,\Fuman_Table>

loadAllTables()

loadAllTables(boolean  $reload = false) : void

Loads all tables which are defined in fuman_table

Parameters

boolean $reload

setConfig()

setConfig(\Fuman_Config  $config) : void

Set {@link Fuman_Config}

Parameters

\Fuman_Config $config

getConfig()

getConfig() : \Fuman_Config

Get {@link Fuman_Config}

Returns

\Fuman_Config

setFactory()

setFactory(\Fuman_Factory  $factory) : void

Set {@link Fuman_Factory}

Parameters

\Fuman_Factory $factory

getFactory()

getFactory() : \Fuman_Factory

Return Set {@link Fuman_Factory}

Returns

\Fuman_Factory

setResponse()

setResponse(\Fuman_Response_Abstract|null  $response = null) : void

Set {@link Fuman_Response_Abstract}

Parameters

\Fuman_Response_Abstract|null $response

getResponse()

getResponse() : \Fuman_Response_Abstract

Returns {@link Fuman_Response_Abstract}

Returns

\Fuman_Response_Abstract

getClient()

getClient() : \Fuman_Client

Return {@link Fuman_Client}

Returns

\Fuman_Client

addAction()

addAction(string  $actionClassName) : void

Adds action If action implement Fuman_Db_Record_Listener the action will be passed automatically to Fuman_Application->getRecordListeners

Parameters

string $actionClassName

getRecordListenerActionDescriptors()

getRecordListenerActionDescriptors() : array<mixed,\Fuman_Db_Record_Listener>

Gets action descriptors which listens to records

Returns

array<mixed,\Fuman_Db_Record_Listener>

getActionDescriptor()

getActionDescriptor(string  $actionClassName, boolean  $autoAdd = true) : \Fuman_Action_Descriptor

Returns a stdClass which describes an {@link Fuman_Action_Abstract}.

Parameters

string $actionClassName
boolean $autoAdd

Throws

\Fuman_Exception

When $autoAdd false and action not added yet, a Exception will be thrown

Returns

\Fuman_Action_Descriptor

getActionDescriptorFromConfig()

getActionDescriptorFromConfig(string  $actionConfigName, null|string  $defaultClassName = null, boolean  $autoAdd = true) : \Fuman_Action_Descriptor

Gets an action descriptor defined in config under [action]

Parameters

string $actionConfigName
null|string $defaultClassName
boolean $autoAdd

Returns

\Fuman_Action_Descriptor

getActionDescriptors()

getActionDescriptors() : array<mixed,\Fuman_Action_Descriptor>

Gets action descriptors

Returns

array<mixed,\Fuman_Action_Descriptor>

invalidateCaches()

invalidateCaches() 

Deletes internal caches if any

getTranslation()

getTranslation(string  $key, string|null  $language = null, \stdClass|null  $args = null, boolean  $addInlineTranslationSpan = false) : string

Returns a Translation. Shortcut for {@link Fuman_Table_Translation::getTranslation($key)}

Parameters

string $key
string|null $language
\stdClass|null $args
boolean $addInlineTranslationSpan

Returns

string

getAccessibleTranslation()

getAccessibleTranslation(string|\Fuman_Navigation_Item|\Fuman_Action_Abstract  $key, string|null  $title = null, boolean  $addInlineTranslationSpan = false) : string

Gets accessible translation

Parameters

string|\Fuman_Navigation_Item|\Fuman_Action_Abstract $key
string|null $title
boolean $addInlineTranslationSpan

Returns

string

getDirectionForLanguage()

getDirectionForLanguage(string  $language) : string

Get direction (ltr,rtl) for language

Parameters

string $language

Returns

string

hasTranslation()

hasTranslation(string  $key) : boolean

Returns true when translation is set. Shortcut for {@link Fuman_Table_Translation::hasTranslation($key)}

Parameters

string $key

Returns

boolean

getInlineTranslationAttribute()

getInlineTranslationAttribute(string  $key) : string

Gets the data-res_name html element attribute for a modifiable translation add space before it; thus, we don't add spaces in to the code!!!

Parameters

string $key

Returns

string

getSystemMessages()

getSystemMessages() : \Fuman_System_Messages

Returns {@link Fuman_System_Messages}

Returns

\Fuman_System_Messages

getCache()

getCache() : \Fuman_File_Cache

Returns {@link Fuman_Cache}

Returns

\Fuman_File_Cache

_getDbName()

_getDbName(string  $name) : string

Gets appropriate db name

Parameters

string $name

Returns

string

_initActionDescriptors()

_initActionDescriptors() : void

Initialize action descriptors

_getActionDescriptorCacheType()

_getActionDescriptorCacheType() : integer

Gets the cache type for action descriptors

Returns

integer

_cacheActionDescriptors()

_cacheActionDescriptors() : void

Cache action descriptors

_loadActionDescriptors()

_loadActionDescriptors() : void

Load action descriptors