Admin Page Framework Documentation

Packages

  • AdminPageFramework
    • Common
      • Factory
      • Form
        • FieldType
      • Utility
    • Factory
      • AdminPage
      • MetaBox
      • NetworkAdmin
      • PageMetaBox
      • PostType
      • TaxonomyField
      • TermMeta
      • UserMeta
      • Widget
    • Utility

Classes

  • AdminPageFramework_AdminNotice
  • AdminPageFramework_ArrayHandler
  • AdminPageFramework_Debug
  • AdminPageFramework_Debug_Base
  • AdminPageFramework_Debug_Log
  • AdminPageFramework_Debug_Utility
  • AdminPageFramework_RegisterClasses

Resources

  • Tutorials
  • Support
  • Reporting Issues

Class AdminPageFramework_Debug

Provides debugging methods.

Use the methods of this class to check variable contents.

Package: AdminPageFramework\Common\Utility
Since: 2.0.0
Since: 3.1.3 Extends AdminPageFramework_WPUtility
Since: 3.7.1 Extends AdminPageFramework_FrameworkUtility
Extends: AdminPageFramework_FrameworkUtility
Image: http://admin-page-framework.michaeluno.jp/image/common/utility/debug.png
Located at factory/_common/utility/debug/AdminPageFramework_Debug.php

Methods summary

public static
# dump( array|string $asArray, string $sFilePath = null, boolean $bStackTrace = false, integer $iStringLengthLimit = 0, integer $iArrayDepthLimit = 0 )

Prints out the given variable contents

If a file pass is given to the second parameter, it saves the output in the file.

Parameters

$asArray
array|string
$asArray The variable to check its contents.
$sFilePath
string
$sFilePath The file path for a log file.
$bStackTrace
boolean
$bStackTrace Whether to include a stack trace.
$iStringLengthLimit
integer
$iStringLengthLimit
$iArrayDepthLimit
integer
$iArrayDepthLimit

Since

3.2.0

Remark

An alias of the dumpArray() method.
public static string
# getDetails( mixed $mValue, mixed $bEscape = true, mixed $bStackTrace = false, mixed $iStringLengthLimit = 0, mixed $iArrayDepthLimit = 0 )

Returns a string representation of a given value with details.

Returns

string

Since

3.8.9
public static string
# get( array|string $asArray, string $sFilePath = null, boolean $bEscape = true, boolean $bStackTrace = false, integer $iStringLengthLimit = 0, integer $iArrayDepthLimit = 0 )

Retrieves the output of the given variable contents.

If a file pass is given to the second parameter, it saves the output in the file.

To get variable details, use getDetails().

Parameters

$asArray
array|string
$asArray The variable to check its contents.
$sFilePath
string
$sFilePath The file path for a log file.
$bEscape
boolean
$bEscape Whether to escape characters.
$bStackTrace
boolean
$bStackTrace Whether to include a stack trace.
$iStringLengthLimit
integer
$iStringLengthLimit
$iArrayDepthLimit
integer
$iArrayDepthLimit

Returns

string

Since

3.2.0

See

AdminPageFramework_Debug::getDetails()

Remark

An alias of getArray() method. No variable details.
public static
# log( mixed $mValue, string $sFilePath = null, boolean $bStackTrace = false, integer $iTrace = 0, integer $iStringLengthLimit = 99999, integer $iArrayDepthLimit = 50 )

Logs the given variable output to a file.

Example

$_aValues = array( 'foo', 'bar' );
AdminPageFramework_Debug::log( $aValues );

Parameters

$mValue
mixed
$mValue The value to log.
$sFilePath
string
$sFilePath The log file path.
$bStackTrace
boolean
$bStackTrace Whether to include the stack trace.
$iTrace
integer
$iTrace The count of back-trace.
$iStringLengthLimit
integer
$iStringLengthLimit The string value length limit.
$iArrayDepthLimit
integer
$iArrayDepthLimit The depth limit for arrays.*

Since

3.1.0
3.1.3 Made it leave milliseconds and elapsed time from the last call of the method.
3.3.0 Made it indicate the data type.
3.3.1 Made it indicate the data length.
3.8.22 Added the $bStackTrace, $iTrace, $iStringLengthLimit, $iArrayDepthLimit parameters.

Remark

The alias of the logArray() method.

Magic methods summary

Properties summary

Related

If you find undocumented functionality, please report it here.

Admin Page Framework