PHP Class Spot\Log

Afficher le fichier Open project: vlucas/spot Class Usage Examples

Protected Properties

Свойство Type Description
$_queries
$_queryCount
$_queryLimit

Méthodes publiques

Méthode Description
addQuery ( $adapter, mixed $query, mixed $data = null ) Add query to log
lastQuery ( ) : array Get last query run from log
queries ( ) : array Get full query log
queryCount ( ) : integer Get a count of how many queries have been run
queryLimit ( $limit = null ) : integer Get/set query limit A limit should be set by default to prevent query log from consuming and exhausing available memory

Method Details

addQuery() public static méthode

Add query to log
public static addQuery ( $adapter, mixed $query, mixed $data = null )
$query mixed Query run
$data mixed Data used in query - usually array, but can be scalar or null

lastQuery() public static méthode

Get last query run from log
public static lastQuery ( ) : array
Résultat array Queries that have been executed and all data that has been passed with them

queries() public static méthode

Get full query log
public static queries ( ) : array
Résultat array Queries that have been executed and all data that has been passed with them

queryCount() public static méthode

Get a count of how many queries have been run
public static queryCount ( ) : integer
Résultat integer Total number of queries that have been run

queryLimit() public static méthode

Get/set query limit A limit should be set by default to prevent query log from consuming and exhausing available memory
public static queryLimit ( $limit = null ) : integer
Résultat integer Query limit

Property Details

$_queries protected_oe static_oe property

protected static $_queries

$_queryCount protected_oe static_oe property

protected static $_queryCount

$_queryLimit protected_oe static_oe property

protected static $_queryLimit