Abstract utility class containing caching and sql loading function

package Gems
subpackage Util
copyright Copyright (c) 2015 Erasmus MC
license New BSD License
since Class available since version 1.7.2 Mar 2, 2016 1:42:12 PM
inherited_from \Gems\Util\UtilAbstract

 Methods

Returns a callable if a method is called as a variable

__get(string $name) : \MUtil_Lazy_Call
Inherited

Parameters

$name

string

Returns

\MUtil_Lazy_Call

Called after the check that all required registry values have been set correctly has run.

afterRegistry() : void

Performs a check for all set monitors

checkMonitors() : array

Returns

arrayof messages

Cleans up everything to a save cacheId

cleanupForCacheId(string $cacheId) : string
InheritedStatic

Parameters

$cacheId

string

Returns

string

Return cron mail monitor

getCronMailMonitor() : \MUtil\Util\MonitorJob

Returns

\MUtil\Util\MonitorJob

Start the cron mail monitor

reverseMaintenanceMonitor() : boolean

Returns

booleanTrue when the job was started

Start the cron mail monitor

startCronMailMonitor() : boolean

Returns

booleanTrue when the job was started

Get the mail addresses for a monitor

_getMailTo(string $monitorName, string $where = null) : boolean

Parameters

$monitorName

string

ProjectSettings name

$where

string

Optional, a gems__staff SQL WHERE statement

Returns

boolean

Utility function for loading a complete query from cache into objects

_getObjectsAllCached(string $cacheId, object $object, mixed $sql, array $binds = null, mixed $tags = array()) : array
Inherited

Parameters

$cacheId

string

The class is prepended to this id

$object

object

The object to put the data in

$sql

mixed

string or \Zend_Db_Select

$binds

array

sql paramters

$tags

mixed

atring or array of strings

Returns

array

Utility function for loading a complete query from cache

_getSelectAllCached(string $cacheId, mixed $sql, array $binds = array(), mixed $tags = array()) : array
Inherited

Parameters

$cacheId

string

The class is prepended to this id

$sql

mixed

string or \Zend_Db_Select

$binds

array

sql paramters

$tags

mixed

atring or array of strings

Returns

array

Utility function for loading a query paired from cache

_getSelectPairsCached(string $cacheId, mixed $sql, array $binds = array(), mixed $tags = array(), string $sort = null) : array
Inherited

Parameters

$cacheId

string

The class is prepended to this id

$sql

mixed

string or \Zend_Db_Select

$binds

array

sql paramters

$tags

mixed

atring or array of strings

$sort

string

Optional function to sort on, only known functions will do

Returns

array

Utility function for loading a query from cache

_getSelectPairsProcessedCached(string $cacheId, mixed $sql, callable $function, array $binds = array(), mixed $tags = array(), string $sort = null) : array
Inherited

Parameters

$cacheId

string

The class is prepended to this id

$sql

mixed

string or \Zend_Db_Select

$function

callable

The function called with each row to form the result

$binds

array

sql paramters

$tags

mixed

string or array of strings

$sort

string

Optional function to sort on, only known functions will do

Returns

array

Utility function for loading a query from cache

_getSelectProcessedCached(string $cacheId, mixed $sql, callable $function, string $keyField, mixed $tags = array(), string $sort = null) : array
Inherited

Parameters

$cacheId

string

The class is prepended to this id

$sql

mixed

string or \Zend_Db_Select

$function

callable

The function called with each row to form the result

$keyField

string

The field containing the key for each row

$tags

mixed

string or array of strings

$sort

string

Optional function to sort on, only known functions will do

Returns

array

Sort the array using the specified sort function

_sortResult(array $result, \Gems\Util\strng $sort = 'asort'
Inherited

Parameters

$result

array

$sort

\Gems\Util\strng

 Properties

 

$cache

$cache : \Zend_Cache_Core

Default

 

$db

$db : \Zend_Db_Adapter_Abstract

Default

 

$locale

$locale : \Zend_Locale

Default

 

$project

$project : \Gems_Project_ProjectSettings

Default

 

$source

$source : \MUtil_Registry_Source

Default

 

$util

$util : \Gems_Util

Default