PHP Класс Crud\Listener\ApiQueryLogListener

Very much like the DebugKit version, the SQL log will only be appended if the following conditions is true: 1) The request must be 'api' (.json/.xml) 2) The debug level must be 2 or above Licensed under The MIT License For full copyright and license information, please see the LICENSE.txt
Наследование: extends BaseListener
Показать файл Открыть проект

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

Метод Описание
beforeRender ( Cake\Event\Event $event ) : void Appends the query log to the JSON or XML output
implementedEvents ( ) : array Returns a list of all events that will fire in the controller during its lifecycle.
setupLogging ( Cake\Event\Event $event ) : void Setup logging for all connections

Защищенные методы

Метод Описание
_getQueryLogs ( ) : array Get the query logs for all sources
_getSource ( string $source ) : Cake\Datasource\ConnectionInterface Get a specific data source
_getSources ( ) : array Get a list of sources defined in database.php

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

_getQueryLogs() защищенный Метод

Get the query logs for all sources
protected _getQueryLogs ( ) : array
Результат array

_getSource() защищенный Метод

Get a specific data source
protected _getSource ( string $source ) : Cake\Datasource\ConnectionInterface
$source string Datasource name
Результат Cake\Datasource\ConnectionInterface

_getSources() защищенный Метод

Get a list of sources defined in database.php
protected _getSources ( ) : array
Результат array

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

Appends the query log to the JSON or XML output
public beforeRender ( Cake\Event\Event $event ) : void
$event Cake\Event\Event Event
Результат void

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

You can override this function to add you own listener callbacks We attach at priority 10 so normal bound events can run before us
public implementedEvents ( ) : array
Результат array

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

Setup logging for all connections
public setupLogging ( Cake\Event\Event $event ) : void
$event Cake\Event\Event Event
Результат void