PHP Class Aoe_Scheduler_Helper_Data, Aoe_Scheduler

Author: Fabrizio Branca
Inheritance: extends Mage_Core_Helper_Abstract
Afficher le fichier Open project: aoepeople/aoe_scheduler

Protected Properties

Свойство Type Description
$groupsToJobsMap

Méthodes publiques

Méthode Description
addGroupJobs ( array $jobs, array $groups )
checkCachePrefix ( ) : boolean Check if the cache prefix from the database matches the cache prefix from the local.xml file
dateDiff ( $time1, $time2 = null ) : integer Diff between to times;
decorateStatus ( $status ) : string Decorate status values
decorateTime ( string $value, boolean $echoToday = false, string $dateFormat = null ) : string Decorate time values
decorateTimeFrameCallBack ( string $value ) : string Wrapper for decorateTime to be used a frame_callback to avoid that additional parameters conflict with the method's optional ones
getCallBack ( $runModel ) : array Get callback from runModel
getConfiguredUser ( ) : string | null Return the configured cron user
getDbCachePrefix ( )
getGroupsToJobsMap ( $forceRebuild = false )
getLastExecutionTime ( $jobCode ) : boolean Get last execution time
getLastHeartbeat ( ) Get last heartbeat
getLastRunUser ( ) : string | null Get the last user who ran a schedule from core variables
getRunningUser ( ) : string Return the current system user running this process
getShouldKillOnWrongUser ( ) : boolean Should processes not running the configured user be killed?
getShowUserCronMessage ( ) : boolean Should we warn the user if the schedule is being run as the wrong user?
isDisabled ( $jobCode ) : boolean Check if job code is disabled in configuration
matchesIncludeExclude ( $jobCode, array $include, array $exclude ) : mixed Check if a job matches the group include/exclude lists
runningAsConfiguredUser ( boolean $useRunningUser = true ) : boolean Check the configuration value for which user the cron should be run as, and check if it matches the actual user.
sendErrorMail ( Aoe_Scheduler_Model_Schedule $schedule, $error ) : void Send error mail
trimExplode ( $delim, string $string, boolean $removeEmptyValues = false ) : array Explodes a string and trims all values for whitespace in the ends.
validateCronExpression ( $cronExpression ) : boolean Validate cron expression

Method Details

addGroupJobs() public méthode

public addGroupJobs ( array $jobs, array $groups )
$jobs array
$groups array

checkCachePrefix() public méthode

Check if the cache prefix from the database matches the cache prefix from the local.xml file
public checkCachePrefix ( ) : boolean
Résultat boolean

dateDiff() public méthode

Diff between to times;
public dateDiff ( $time1, $time2 = null ) : integer
$time1
$time2
Résultat integer

decorateStatus() public méthode

Decorate status values
public decorateStatus ( $status ) : string
$status
Résultat string

decorateTime() public méthode

Decorate time values
public decorateTime ( string $value, boolean $echoToday = false, string $dateFormat = null ) : string
$value string
$echoToday boolean if true "Today" will be added
$dateFormat string make sure Y-m-d is in it, if you want to have it replaced
Résultat string

decorateTimeFrameCallBack() public méthode

Wrapper for decorateTime to be used a frame_callback to avoid that additional parameters conflict with the method's optional ones
public decorateTimeFrameCallBack ( string $value ) : string
$value string
Résultat string

getCallBack() public méthode

Get callback from runModel
public getCallBack ( $runModel ) : array
$runModel
Résultat array

getConfiguredUser() public méthode

Return the configured cron user
public getConfiguredUser ( ) : string | null
Résultat string | null

getDbCachePrefix() public méthode

public getDbCachePrefix ( )

getGroupsToJobsMap() public méthode

public getGroupsToJobsMap ( $forceRebuild = false )

getLastExecutionTime() public méthode

Get last execution time
public getLastExecutionTime ( $jobCode ) : boolean
$jobCode
Résultat boolean

getLastHeartbeat() public méthode

Get last heartbeat
public getLastHeartbeat ( )

getLastRunUser() public méthode

Get the last user who ran a schedule from core variables
public getLastRunUser ( ) : string | null
Résultat string | null

getRunningUser() public méthode

Return the current system user running this process
public getRunningUser ( ) : string
Résultat string

getShouldKillOnWrongUser() public méthode

Should processes not running the configured user be killed?
public getShouldKillOnWrongUser ( ) : boolean
Résultat boolean

getShowUserCronMessage() public méthode

Should we warn the user if the schedule is being run as the wrong user?
public getShowUserCronMessage ( ) : boolean
Résultat boolean

isDisabled() public méthode

Check if job code is disabled in configuration
public isDisabled ( $jobCode ) : boolean
$jobCode
Résultat boolean

matchesIncludeExclude() public méthode

Check if a job matches the group include/exclude lists
public matchesIncludeExclude ( $jobCode, array $include, array $exclude ) : mixed
$jobCode
$include array
$exclude array
Résultat mixed

runningAsConfiguredUser() public méthode

Skip if the warning should be ignored.
public runningAsConfiguredUser ( boolean $useRunningUser = true ) : boolean
$useRunningUser boolean If true, use the user running the web server, otherwise use the last run user from core_variable storage
Résultat boolean

sendErrorMail() public méthode

Send error mail
public sendErrorMail ( Aoe_Scheduler_Model_Schedule $schedule, $error ) : void
$schedule Aoe_Scheduler_Model_Schedule
$error
Résultat void

trimExplode() public méthode

If $onlyNonEmptyValues is set, then all blank ('') values are removed.
See also: t3lib_div::trimExplode() in TYPO3
public trimExplode ( $delim, string $string, boolean $removeEmptyValues = false ) : array
$delim
$string string
$removeEmptyValues boolean If set, all empty values will be removed in output
Résultat array Exploded values

validateCronExpression() public méthode

Validate cron expression
public validateCronExpression ( $cronExpression ) : boolean
$cronExpression
Résultat boolean

Property Details

$groupsToJobsMap protected_oe property

protected $groupsToJobsMap