PHP Class Spot\Log

Exibir arquivo Open project: vlucas/spot Class Usage Examples

Protected Properties

Property Type Description
$_queries
$_queryCount
$_queryLimit

Public Methods

Method 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 method

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 method

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

queries() public static method

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

queryCount() public static method

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

queryLimit() public static method

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
return 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