PHP 클래스 RedBeanPHP\Logger\RDefault\Debug

A special logger for debugging purposes. Provides debugging logging functions for RedBeanPHP.
저자: Gabor de Mooij and the RedBeanPHP Community
상속: extends RedBeanPHP\Logger\RDefault, implements RedBeanPHP\Logger
파일 보기 프로젝트 열기: gabordemooij/redbean 1 사용 예제들

공개 메소드들

메소드 설명
log ( ) : void Logger method.
setParamStringLength ( integer $len = 20 ) : self Sets the max string length for the parameter output in SQL queries. Set this value to a reasonable number to keep you SQL queries readable.

보호된 메소드들

메소드 설명
fillInValue ( mixed $value ) : string Fills in a value of a binding and truncates the resulting string if necessary.
normalizeBindings ( array $bindings ) : array Normalizes the bindings.
normalizeSlots ( string $sql ) : string Normalizes the slots in an SQL string.
output ( string $str ) : void Dependending on the current mode of operation, this method will either log and output to STDIN or just log.

비공개 메소드들

메소드 설명
writeQuery ( string $newSql, $newBindings ) : string Writes a query for logging with all bindings / params filled in.

메소드 상세

fillInValue() 보호된 메소드

Fills in a value of a binding and truncates the resulting string if necessary.
protected fillInValue ( mixed $value ) : string
$value mixed bound value
리턴 string

log() 공개 메소드

Takes a number of arguments tries to create a proper debug log based on the available data.
public log ( ) : void
리턴 void

normalizeBindings() 보호된 메소드

Replaces numeric binding keys with :slot1 :slot2 etc.
protected normalizeBindings ( array $bindings ) : array
$bindings array bindings to normalize
리턴 array

normalizeSlots() 보호된 메소드

Replaces question mark slots with :slot1 :slot2 etc.
protected normalizeSlots ( string $sql ) : string
$sql string sql to normalize
리턴 string

output() 보호된 메소드

Depending on the value of constant PHP_SAPI this function will format output for console or HTML.
protected output ( string $str ) : void
$str string string to log or output and log
리턴 void

setParamStringLength() 공개 메소드

Sets the max string length for the parameter output in SQL queries. Set this value to a reasonable number to keep you SQL queries readable.
public setParamStringLength ( integer $len = 20 ) : self
$len integer string length
리턴 self