PHP Класс Aoe_Scheduler_Helper_Data, Aoe_Scheduler

Автор: Fabrizio Branca
Наследование: extends Mage_Core_Helper_Abstract
Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
$groupsToJobsMap

Открытые методы

Метод Описание
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

Описание методов

addGroupJobs() публичный Метод

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

checkCachePrefix() публичный Метод

Check if the cache prefix from the database matches the cache prefix from the local.xml file
public checkCachePrefix ( ) : boolean
Результат boolean

dateDiff() публичный Метод

Diff between to times;
public dateDiff ( $time1, $time2 = null ) : integer
$time1
$time2
Результат integer

decorateStatus() публичный Метод

Decorate status values
public decorateStatus ( $status ) : string
$status
Результат string

decorateTime() публичный Метод

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
Результат string

decorateTimeFrameCallBack() публичный Метод

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
Результат string

getCallBack() публичный Метод

Get callback from runModel
public getCallBack ( $runModel ) : array
$runModel
Результат array

getConfiguredUser() публичный Метод

Return the configured cron user
public getConfiguredUser ( ) : string | null
Результат string | null

getDbCachePrefix() публичный Метод

public getDbCachePrefix ( )

getGroupsToJobsMap() публичный Метод

public getGroupsToJobsMap ( $forceRebuild = false )

getLastExecutionTime() публичный Метод

Get last execution time
public getLastExecutionTime ( $jobCode ) : boolean
$jobCode
Результат boolean

getLastHeartbeat() публичный Метод

Get last heartbeat
public getLastHeartbeat ( )

getLastRunUser() публичный Метод

Get the last user who ran a schedule from core variables
public getLastRunUser ( ) : string | null
Результат string | null

getRunningUser() публичный Метод

Return the current system user running this process
public getRunningUser ( ) : string
Результат string

getShouldKillOnWrongUser() публичный Метод

Should processes not running the configured user be killed?
public getShouldKillOnWrongUser ( ) : boolean
Результат boolean

getShowUserCronMessage() публичный Метод

Should we warn the user if the schedule is being run as the wrong user?
public getShowUserCronMessage ( ) : boolean
Результат boolean

isDisabled() публичный Метод

Check if job code is disabled in configuration
public isDisabled ( $jobCode ) : boolean
$jobCode
Результат boolean

matchesIncludeExclude() публичный Метод

Check if a job matches the group include/exclude lists
public matchesIncludeExclude ( $jobCode, array $include, array $exclude ) : mixed
$jobCode
$include array
$exclude array
Результат mixed

runningAsConfiguredUser() публичный Метод

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
Результат boolean

sendErrorMail() публичный Метод

Send error mail
public sendErrorMail ( Aoe_Scheduler_Model_Schedule $schedule, $error ) : void
$schedule Aoe_Scheduler_Model_Schedule
$error
Результат void

trimExplode() публичный Метод

If $onlyNonEmptyValues is set, then all blank ('') values are removed.
См. также: 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
Результат array Exploded values

validateCronExpression() публичный Метод

Validate cron expression
public validateCronExpression ( $cronExpression ) : boolean
$cronExpression
Результат boolean

Описание свойств

$groupsToJobsMap защищенное свойство

protected $groupsToJobsMap