Overview

Packages

  • application
    • commands
    • components
      • actions
      • filters
      • leftWidget
      • permissions
      • sortableWidget
      • util
      • webupdater
      • x2flow
        • actions
        • triggers
      • X2GridView
      • X2Settings
    • controllers
    • models
      • embedded
    • modules
      • accounts
        • controllers
        • models
      • actions
        • controllers
        • models
      • calendar
        • controllers
        • models
      • charts
        • models
      • contacts
        • controllers
        • models
      • docs
        • components
        • controllers
        • models
      • groups
        • controllers
        • models
      • marketing
        • components
        • controllers
        • models
      • media
        • controllers
        • models
      • mobile
        • components
      • opportunities
        • controllers
        • models
      • products
        • controllers
        • models
      • quotes
        • controllers
        • models
      • services
        • controllers
        • models
      • template
        • models
      • users
        • controllers
        • models
      • workflow
        • controllers
        • models
      • x2Leads
        • controllers
        • models
  • Net
  • None
  • PHP
  • system
    • base
    • caching
      • dependencies
    • collections
    • console
    • db
      • ar
      • schema
        • cubrid
        • mssql
        • mysql
        • oci
        • pgsql
        • sqlite
    • i18n
      • gettext
    • logging
    • test
    • utils
    • validators
    • web
      • actions
      • auth
      • filters
      • form
      • helpers
      • renderers
      • services
      • widgets
        • captcha
        • pagers
  • Text
    • Highlighter
  • zii
    • behaviors
    • widgets
      • grid
      • jui

Classes

  • CDateTimeParser
  • CFileHelper
  • CFormatter
  • CLocalizedFormatter
  • CMarkdownParser
  • CPasswordHelper
  • CPropertyValue
  • CTimestamp
  • CVarDumper
  • Overview
  • Package
  • Class
  • Tree

Class CVarDumper

CVarDumper is intended to replace the buggy PHP function var_dump and print_r. It can correctly identify the recursively referenced objects in a complex object structure. It also has a recursive depth control to avoid indefinite recursive display of some peculiar variables.

CVarDumper can be used as follows,

CVarDumper::dump($var);
Package: system\utils
Copyright: 2008-2013 Yii Software LLC
License: http://www.yiiframework.com/license/
Author: Qiang Xue <qiang.xue@gmail.com>
Since: 1.0
Located at x2engine/framework/utils/CVarDumper.php
Methods summary
public static
# dump( mixed $var, integer $depth = 10, boolean $highlight = false )

Displays a variable. This method achieves the similar functionality as var_dump and print_r but is more robust when handling complex objects such as Yii controllers.

Displays a variable. This method achieves the similar functionality as var_dump and print_r but is more robust when handling complex objects such as Yii controllers.

Parameters

$var
mixed
$var variable to be dumped
$depth
integer
$depth maximum depth that the dumper should go into the variable. Defaults to 10.
$highlight
boolean
$highlight whether the result should be syntax-highlighted
public static string
# dumpAsString( mixed $var, integer $depth = 10, boolean $highlight = false )

Dumps a variable in terms of a string. This method achieves the similar functionality as var_dump and print_r but is more robust when handling complex objects such as Yii controllers.

Dumps a variable in terms of a string. This method achieves the similar functionality as var_dump and print_r but is more robust when handling complex objects such as Yii controllers.

Parameters

$var
mixed
$var variable to be dumped
$depth
integer
$depth maximum depth that the dumper should go into the variable. Defaults to 10.
$highlight
boolean
$highlight whether the result should be syntax-highlighted

Returns

string
the string representation of the variable
API documentation generated by ApiGen 2.8.0