PHP Class Clockwork\Request\Timeline

Afficher le fichier Open project: itsgoingd/clockwork Class Usage Examples

Méthodes publiques

Свойство Type Description
$data Timeline data

Méthodes publiques

Méthode Description
addEvent ( $name, $description, $start_time, $end_time, array $data = [] ) Add a new event
endEvent ( $name ) End recording of event specified by name argument, throws exception if specified event is not found
finalize ( $start = null, $end = null ) End all unfinished events
startEvent ( $name, $description, $time = null, array $data = [] ) Start recording a new event, expects name, description and optional time as arguments, if time is not provided, current time will be used, if time equals 'start', request time will be used
toArray ( ) Return timeline data as array

Method Details

addEvent() public méthode

Add a new event
public addEvent ( $name, $description, $start_time, $end_time, array $data = [] )
$data array

endEvent() public méthode

End recording of event specified by name argument, throws exception if specified event is not found
public endEvent ( $name )

finalize() public méthode

End all unfinished events
public finalize ( $start = null, $end = null )

startEvent() public méthode

Start recording a new event, expects name, description and optional time as arguments, if time is not provided, current time will be used, if time equals 'start', request time will be used
public startEvent ( $name, $description, $time = null, array $data = [] )
$data array

toArray() public méthode

Return timeline data as array
public toArray ( )

Property Details

$data public_oe property

Timeline data
public $data