Class: dataExceptionTraceParam

Attributes:
Inherits:
Implements:

Contents:

Introduction

Stores a parameter for a function or a method from a debug_backtrace result

Meta Data

authorBashkim Isai
packageException

Constants

There are no constants defined for this class.

Properties

Methods

Also See

Class Syntax

In file D:\oblib-core\php\oblib\dataException\dataExceptionTraceParam.class.php between lines 50 and 124.

<?php
 
    
/**
     * Stores a parameter for a function or a method from a debug_backtrace result
     *
     * @author    Bashkim Isai
     * @package    Exception
     * @see        Class [Exception]
     * @see        Class [dataObject]
     */

    
class dataExceptionTraceParam extends dataObject
    
{
        
        
/**
         * Figures out what type of object the parameter was and attempts to give
         * some type of value representation of that item
         * 
         * @see        Class [dataExceptionTrace]
         * @see        Class [dataException]
         * @see        Class [Exception]
         * @return    Void
         */
        
        
function __construct ($mixDebug)
        {
            
parent::__construct ('ExceptionTraceParam');
            
            
$this->___Push (new dataString ('Type'));
            
$this->___Push (new dataString ('Value'));
            
            if (
is_null ($mixDebug))
            {
                
$this->Type 'NULL';
                
$this->Value '';
            }
            elseif (
is_object ($mixDebug))
            {
                if (
is_subclass_of ($mixDebug'data'))
                {
                    
$this->Type 'ObLib [' get_class ($mixDebug) . ']';
                    
$this->Value trim ($mixDebug->___Render ()->ownerDocument->saveXML ());
                }
                else
                {
                    
$this->Type 'Object [' get_class ($mixDebug) . ']';
                    
$this->Value print_r ($mixDebugTRUE);
                }
            }
            else if (
is_array ($mixDebug))
            {
                
$this->Type 'Array (' count ($mixDebug) . ')';
                
$this->Value print_r ($mixDebugTRUE);
            }
            else if (
is_bool ($mixDebug))
            {
                
$this->Type 'Boolean';
                
$this->Value $mixDebug "TRUE" "FALSE";
            }
            else if (
is_float ($mixDebug))
            {
                
$this->Type 'Float';
                
$this->Value $mixDebug;
            }
            else if (
is_integer ($mixDebug))
            {
                
$this->Type 'Integer';
                
$this->Value $mixDebug;
            }
            else if (
is_resource ($mixDebug))
            {
                
$this->Type 'Resource [' get_resource_type ($mixDebug) . ']';
                
$this->Value '';
            }
            else if (
is_string ($mixDebug))
            {
                
$this->Type 'String';
                
$this->Value $mixDebug;
            }
            else
            {
                
$this->Type 'Unknown';
                
$this->Value $mixDebug;
            }
        }
    }

?>