PHP Класс Clockwork\Request\Timeline

Показать файл Открыть проект Примеры использования класса

Открытые свойства

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

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

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

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

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

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

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

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

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

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

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

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() публичный Метод

Return timeline data as array
public toArray ( )

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

$data публичное свойство

Timeline data
public $data