PHP Class Pheasant\Database\FilterChain

Afficher le fichier Open project: lox/pheasant Class Usage Examples

Méthodes publiques

Méthode Description
clear ( ) Clears all callbacks
execute ( $sql, $executor ) : result Executes the query through the internal filters and executor
onError ( $callback ) Attach an error handler, gets called with the exception, return ignored
onQuery ( $callback ) Attach an intercepting filter, gets called with query, returns query
onResult ( $callback ) Attach an results filter, gets called with the query, result and the time taken, returns result

Method Details

clear() public méthode

Clears all callbacks
public clear ( )

execute() public méthode

Executes the query through the internal filters and executor
public execute ( $sql, $executor ) : result
Résultat result set of some sort

onError() public méthode

Attach an error handler, gets called with the exception, return ignored
public onError ( $callback )

onQuery() public méthode

Attach an intercepting filter, gets called with query, returns query
public onQuery ( $callback )

onResult() public méthode

Attach an results filter, gets called with the query, result and the time taken, returns result
public onResult ( $callback )