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
파일 보기 프로젝트 열기: friendsofcake/crud

공개 메소드들

메소드 설명
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