コード例 #1
0
ファイル: Var_Dump.php プロジェクト: vinnivinsachi/Vincent-DR
 /**
  * Outputs or returns a string representation of a variable.
  *
  * @see Var_Dump::singleton(), Var_Dump::displayInit()
  * @param mixed $expression The variable to parse.
  * @param bool $return Whether the variable should be echoed or returned.
  * @param mixed $options String (display mode) or array (Global parameters).
  * @param array $rendererOptions Parameters for the rendering.
  * @return string If returned, the string representation of the variable.
  * @access public
  */
 function display($expression, $return = FALSE, $options = NULL, $rendererOptions = NULL)
 {
     $display =& Var_Dump::singleton();
     if (!is_null($options) or !is_null($rendererOptions)) {
         if (is_null($rendererOptions)) {
             $rendererOptions = array();
         }
         $display->Var_Dump($options, $rendererOptions);
     }
     if ($return === TRUE) {
         return $display->toString($expression);
     } else {
         echo $display->toString($expression);
     }
 }