PHP 클래스 Crunz\Schedule

파일 보기 프로젝트 열기: lavary/crunz 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$afterCallbacks array The array of callbacks to be run after all the event is finished.
$beforeCallbacks array The array of callbacks to be run before all the events are finished
$errorCallbacks array The array of callbacks to call in case of an error.
$events array All of the events on the schedule.

공개 메소드들

메소드 설명
after ( Closure $callback ) Register a callback to be called after the operation.
afterCallbacks ( ) : array Return all registered after callbacks
before ( Closure $callback ) Register a callback to be called before the operation.
beforeCallbacks ( ) : array Return all registered before callbacks
dismissEvent ( integer $key ) Dismiss an event after it is finished
dueEvents ( ) : array Get all of the events on the schedule that are due.
errorCallbacks ( ) : array Return all registered error callbacks
events ( array $events = null ) : array Get or set the events of the schedule object
onError ( Closure $callback ) Register a callback to call in case of an error
pingBefore ( string $url ) Register a callback to ping a given URL before the job runs.
run ( string $command, array $parameters = [] ) : Event Add a new event to the schedule object.
then ( Closure $callback ) Register a callback to be called after the operation.
thenPing ( string $url ) Register a callback to ping a given URL after the job runs.

보호된 메소드들

메소드 설명
compileParameters ( array $parameters ) : string Compile parameters for a command.
id ( ) : string Generate a unique task id

메소드 상세

after() 공개 메소드

Register a callback to be called after the operation.
public after ( Closure $callback )
$callback Closure

afterCallbacks() 공개 메소드

Return all registered after callbacks
public afterCallbacks ( ) : array
리턴 array

before() 공개 메소드

Register a callback to be called before the operation.
public before ( Closure $callback )
$callback Closure

beforeCallbacks() 공개 메소드

Return all registered before callbacks
public beforeCallbacks ( ) : array
리턴 array

compileParameters() 보호된 메소드

Compile parameters for a command.
protected compileParameters ( array $parameters ) : string
$parameters array
리턴 string

dismissEvent() 공개 메소드

Dismiss an event after it is finished
public dismissEvent ( integer $key )
$key integer

dueEvents() 공개 메소드

Get all of the events on the schedule that are due.
public dueEvents ( ) : array
리턴 array

errorCallbacks() 공개 메소드

Return all registered error callbacks
public errorCallbacks ( ) : array
리턴 array

events() 공개 메소드

Get or set the events of the schedule object
public events ( array $events = null ) : array
$events array
리턴 array

id() 보호된 메소드

Generate a unique task id
protected id ( ) : string
리턴 string

onError() 공개 메소드

Register a callback to call in case of an error
public onError ( Closure $callback )
$callback Closure

pingBefore() 공개 메소드

Register a callback to ping a given URL before the job runs.
public pingBefore ( string $url )
$url string

run() 공개 메소드

Add a new event to the schedule object.
public run ( string $command, array $parameters = [] ) : Event
$command string
$parameters array
리턴 Event

then() 공개 메소드

Register a callback to be called after the operation.
public then ( Closure $callback )
$callback Closure

thenPing() 공개 메소드

Register a callback to ping a given URL after the job runs.
public thenPing ( string $url )
$url string

프로퍼티 상세

$afterCallbacks 보호되어 있는 프로퍼티

The array of callbacks to be run after all the event is finished.
protected array $afterCallbacks
리턴 array

$beforeCallbacks 보호되어 있는 프로퍼티

The array of callbacks to be run before all the events are finished
protected array $beforeCallbacks
리턴 array

$errorCallbacks 보호되어 있는 프로퍼티

The array of callbacks to call in case of an error.
protected array $errorCallbacks
리턴 array

$events 보호되어 있는 프로퍼티

All of the events on the schedule.
protected array $events
리턴 array