PHP Класс Clockwork\Clockwork

Наследование: implements Psr\Log\LoggerInterface
Показать файл Открыть проект Примеры использования класса

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

Свойство Тип Описание
$dataSources Array of data sources, these objects provide data to be stored in a request object
$log Request\Log instance, data structure which stores data for the log view
$request Request object, data structure which stores data about current application request
$storage Storage object, provides implementation for storing and retrieving request objects
$timeline Request\Timeline instance, data structure which stores data for the timeline view

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

Метод Описание
__construct ( ) Create a new Clockwork instance with default request object
addDataSource ( Clockwork\DataSource\DataSourceInterface $dataSource ) Add a new data source
alert ( $message, array $context = [] )
critical ( $message, array $context = [] )
debug ( $message, array $context = [] )
emergency ( $message, array $context = [] )
endEvent ( $name )
error ( $message, array $context = [] )
getDataSources ( ) Return array of all added data sources
getLog ( ) Return the log instance
getRequest ( ) Return the request object
getStorage ( ) Return the storage object
getTimeline ( ) Return the timeline instance
info ( $message, array $context = [] )
log ( $level = LogLevel::INFO, $message, array $context = [] ) Shortcut methods for the current log instance
notice ( $message, array $context = [] )
resolveRequest ( ) Add data from all data sources to request
setLog ( Log $log ) Set a custom log instance
setRequest ( Request $request ) Set a custom request object
setStorage ( Clockwork\Storage\StorageInterface $storage ) Set a custom storage object
setTimeline ( Timeline $timeline ) Set a custom timeline instance
startEvent ( $name, $description, $time = null ) Shortcut methods for the current timeline instance
storeRequest ( ) Store request via storage object
warning ( $message, array $context = [] )

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

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

Create a new Clockwork instance with default request object
public __construct ( )

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

Add a new data source
public addDataSource ( Clockwork\DataSource\DataSourceInterface $dataSource )
$dataSource Clockwork\DataSource\DataSourceInterface

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

public alert ( $message, array $context = [] )
$context array

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

public critical ( $message, array $context = [] )
$context array

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

public debug ( $message, array $context = [] )
$context array

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

public emergency ( $message, array $context = [] )
$context array

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

public endEvent ( $name )

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

public error ( $message, array $context = [] )
$context array

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

Return array of all added data sources
public getDataSources ( )

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

Return the log instance
public getLog ( )

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

Return the request object
public getRequest ( )

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

Return the storage object
public getStorage ( )

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

Return the timeline instance
public getTimeline ( )

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

public info ( $message, array $context = [] )
$context array

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

Shortcut methods for the current log instance
public log ( $level = LogLevel::INFO, $message, array $context = [] )
$context array

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

public notice ( $message, array $context = [] )
$context array

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

Add data from all data sources to request
public resolveRequest ( )

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

Set a custom log instance
public setLog ( Log $log )
$log Clockwork\Request\Log

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

Set a custom request object
public setRequest ( Request $request )
$request Clockwork\Request\Request

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

Set a custom storage object
public setStorage ( Clockwork\Storage\StorageInterface $storage )
$storage Clockwork\Storage\StorageInterface

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

Set a custom timeline instance
public setTimeline ( Timeline $timeline )
$timeline Clockwork\Request\Timeline

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

Shortcut methods for the current timeline instance
public startEvent ( $name, $description, $time = null )

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

Store request via storage object
public storeRequest ( )

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

public warning ( $message, array $context = [] )
$context array

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

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

Array of data sources, these objects provide data to be stored in a request object
protected $dataSources

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

Request\Log instance, data structure which stores data for the log view
protected $log

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

Request object, data structure which stores data about current application request
protected $request

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

Storage object, provides implementation for storing and retrieving request objects
protected $storage

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

Request\Timeline instance, data structure which stores data for the timeline view
protected $timeline