Amiro.CMS API Reference
Amiro.Ru / Manual
Loading search...

The d class

AMI_Debug
   |
   --d

• Introduction

Short alias for AMI_Debug and its methods.

• Class synopsis

d extends AMI_Debug {
/* Methods */
// Adds bench.
public static b ( string $label ) returns void;
// Dumps entity structure to debug output using print_r().
public static pr ( mixed $entity, [ string $title = '' ], [ $aOptions = array() ] ) returns void;
// Dumps entity structure to debug output.
public static vd ( mixed $entity, [ string $title = '' ], [ $aOptions = array() ] ) returns void;
// Short alias for AMI_Debug::dump() using var_dump().
public static vd1 ( mixed $entity, [ string $title = '' ], [ $aOptions = array() ] ) returns void;
// Short alias for AMI_Debug::dump() using var_export().
public static ve ( mixed $entity, [ string $title = '' ], [ $aOptions = array() ] ) returns void;
// Dumps variable to err.log using var_export().
public static vel ( mixed $entity, [ string $title = '' ] ) returns void;
// Writes string to debug output.
public static w ( string $string ) returns void;
// Short alias for AMI_Debug::dump() using debug_zval_dump().
public static zd ( mixed $entity, [ string $title = '' ], [ $aOptions = array() ] ) returns void;
/* Inherited Methods */
// Adds benchmark.
public static AMI_Debug::bench ( string $label ) returns void;
// Dumps entity structure to debug output.
public static AMI_Debug::dump ( mixed $entity, [ string $title = '' ], [ $aOptions = array('nesting' => 2, 'method' => 'print_r') ] ) returns void;
// Returns class parents as array.
public static AMI_Debug::getClassParents ( mixed $object ) returns array;
// Returns entity full dump as string.
public static AMI_Debug::getDumpAsString ( mixed $entity, [ callback $callback = 'print_r' ], [ $aArgs = array() ] ) returns string;
// Returns trace HTML as string.
public static AMI_Debug::getTraceAsString ( [ $aTrace = null ] ) returns string;
// Printss class parents.
public static AMI_Debug::printClassParents ( mixed $object ) returns void;
// Dumps backtrace to debug output.
public static AMI_Debug::trace ( [ $aTrace = null ] ) returns void;
// Writes string to debug output.
public static AMI_Debug::write ( string $string ) returns void;
}

• Class Methods

// Adds bench.
public static b ( string $label ) returns void;
  • string $label
    Label
Short alias for AMI_Debug::bench().
  Example:
// Dumps entity structure to debug output using print_r().
public static pr ( mixed $entity, [ string $title = '' ], [ $aOptions = array() ] ) returns void;
  • mixed $entity
    Entity to dump
  • string $title
    Entity title
  • array $aOptions
    Array containing dump options:
    • 'nesting' - max nesting level for arrays (2 by default, 0 for no limits),
    • 'method' - dump method, 'print_r'|'var_dump'|'var_export' ('print_r' by default),
    • 'max_count' - maximum dumps per title (none by default)
Short alias for AMI_Debug::dump() using print_r().
  Example:
  •  d::pr(array('k000''k001' => array('k010' => array('k100' => array(123)))));
will output:
 Array(
     [0] => k000
     [k001] => Array(
             [k010] => Array(
                     [k100] => array(3)
                 )
         )
 )
  Example:
  •  d::pr(array('k000''k001' => array('k010' => array('k100' => array(123))))'title1'array('nesting' => 1));
will output:
 Array(
     [0] => k000
     [k001] => Array(
             [k010] => array(1)
         )
 )
  Example:
  •  d::pr(array('k000''k001' => array('k010' => array('k100' => array(123))))'title2'array('nesting' => 0));
will output:
 Array(
     [0] => k000
     [k001] => Array(
             [k010] => Array(
                     [k100] => Array(
                             [0] => 1
                             [1] => 2
                             [2] => 3
                         )
                 )
         )
 )
// Dumps entity structure to debug output.
public static vd ( mixed $entity, [ string $title = '' ], [ $aOptions = array() ] ) returns void;
  • mixed $entity
    Entity to dump
  • string $title
    Entity title
  • array $aOptions
    Array containing dump options:
    • 'nesting' - max nesting level for arrays (2 by default, 0 for no limits),
    • 'method' - dump method, 'print_r'|'var_dump'|'var_export' ('print_r' by default),
    • 'max_count' - maximum dumps per title (none by default)
Short alias for AMI_Debug::dump() using var_dump().
Tags:
see d::pr()
see AMI_Debug::dump()
// Short alias for AMI_Debug::dump() using var_dump().
public static vd1 ( mixed $entity, [ string $title = '' ], [ $aOptions = array() ] ) returns void;
  • mixed $entity
    Entity
  • string $title
    Title
  • array $aOptions
    Options
Prints dump once per title.
Tags:
see d::vd()
see AMI_Debug::dump()
// Short alias for AMI_Debug::dump() using var_export().
public static ve ( mixed $entity, [ string $title = '' ], [ $aOptions = array() ] ) returns void;
  • mixed $entity
    Entity
  • string $title
    Title
  • array $aOptions
    Options
Tags:
see d::pr()
see AMI_Debug::dump()
// Dumps variable to err.log using var_export().
public static vel ( mixed $entity, [ string $title = '' ] ) returns void;
  • mixed $entity
    Entity to dump
  • string $title
    Title
Tags:
since 7.0.0
// Writes string to debug output.
public static w ( string $string ) returns void;
  • string $string
    String to write
Short alias for AMI_Debug::write().
  Example:
  •  d::w('My string');
will output
My string
// Short alias for AMI_Debug::dump() using debug_zval_dump().
public static zd ( mixed $entity, [ string $title = '' ], [ $aOptions = array() ] ) returns void;
  • mixed $entity
    Entity
  • string $title
    Title
  • array $aOptions
    Options
Tags:
see d::pr()
see AMI_Debug::dump()
since 5.14.4