Overview

Namespaces

  • None
  • RedBeanPHP
    • Adapter
    • BeanHelper
    • Cursor
    • Driver
    • Logger
      • RDefault
    • QueryWriter
    • RedException
    • Repository
    • Util

Classes

  • Debug
  • Overview
  • Namespace
  • Class

Class Debug

Debug logger. A special logger for debugging purposes. Provides debugging logging functions for RedBeanPHP.

RedBeanPHP\Logger\RDefault implements RedBeanPHP\Logger
Extended by RedBeanPHP\Logger\RDefault\Debug implements RedBeanPHP\Logger
Namespace: RedBeanPHP\Logger\RDefault
Copyright:

copyright (c) G.J.G.T. (Gabor) de Mooij This source file is subject to the BSD/GPLv2 License that is bundled with this source code in the file license.txt.


License: BSD/GPLv2
Author: Gabor de Mooij and the RedBeanPHP Community
File: RedBeanPHP/Logger/RDefault/Debug.php
Located at Logger/RDefault/Debug.php
Methods summary
protected string
# fillInValue( mixed $value )

Fills in a value of a binding and truncates the resulting string if necessary.

Fills in a value of a binding and truncates the resulting string if necessary.

Parameters

$value
bound value

Returns

string
protected
# output( string $str )

Dependending on the current mode of operation, this method will either log and output to STDIN or just log.

Dependending on the current mode of operation, this method will either log and output to STDIN or just log.

Depending on the value of constant PHP_SAPI this function will format output for console or HTML.

Parameters

$str
string to log or output and log
protected string
# normalizeSlots( string $sql )

Normalizes the slots in an SQL string. Replaces question mark slots with :slot1 :slot2 etc.

Normalizes the slots in an SQL string. Replaces question mark slots with :slot1 :slot2 etc.

Parameters

$sql
sql to normalize

Returns

string
protected array
# normalizeBindings( array $bindings )

Normalizes the bindings. Replaces numeric binding keys with :slot1 :slot2 etc.

Normalizes the bindings. Replaces numeric binding keys with :slot1 :slot2 etc.

Parameters

$bindings
bindings to normalize

Returns

array
public
# log( )

Logger method.

Logger method.

Takes a number of arguments tries to create a proper debug log based on the available data.

Overrides

RedBeanPHP\Logger\RDefault::log()

Implementation of

RedBeanPHP\Logger::log()
public RedBeanPHP\Logger\RDefault\Debug
# setParamStringLength( integer $len = 20 )

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.

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.

Parameters

$len
string length

Returns

RedBeanPHP\Logger\RDefault\Debug
Methods inherited from RedBeanPHP\Logger\RDefault
clear(), getLogs(), grep(), setMode()
Constants inherited from RedBeanPHP\Logger\RDefault
C_LOGGER_ARRAY, C_LOGGER_ECHO
Properties inherited from RedBeanPHP\Logger\RDefault
$logs, $mode
API documentation generated by ApiGen