src/PhpPackages/Dumpy/Dumpy.php
protected function printObject($value, $level = 0)
    {
        $reflector = new ReflectionClass($value);

        // Display the general information about given object.
        $result = $this->getGeneralObjectInfo($value) . PHP_EOL;

        if ( ! $this->config["object_limited_info"]) {
            // Display all parent classes.
            if (count($parents = $this->getAllParentClassNames($reflector)) > 0) {
                $result .= sprintf("Classes: %s" . PHP_EOL, implode(", ", $parents));
            }

            // Display all interfaces (interface inheritance is supported).
            if (count($interfaces = $reflector->getInterfaceNames()) > 0) {
                $result .= sprintf("Interfaces: %s" . PHP_EOL, implode(", ", $interfaces));
            }

            // Display all class traits.
            if (count($traits = $this->getAllTraitNames($reflector)) > 0) {
                $result .= sprintf("Traits: %s" . PHP_EOL, implode(", ", $traits));
            }
        }

        // Display property values.
        if ($info = $this->getPropertyValues($reflector, $value, $level + 1)) {
            $result .=
                str_repeat($this->config["array_indenting"], $level)
                . "Properties:" . PHP_EOL . $info;
        }

        return $result;
    }
protected function printObject($value, $level = 0)
    {
        $reflector = new ReflectionClass($value);

        // Display the general information about given object.
        $result = $this->getGeneralObjectInfo($value) . PHP_EOL;

        if ( ! $this->config["object_limited_info"]) {
            // Display all parent classes.
            if (count($parents = $this->getAllParentClassNames($reflector)) > 0) {
                $result .= sprintf("Classes: %s" . PHP_EOL, implode(", ", $parents));
            }

            // Display all interfaces (interface inheritance is supported).
            if (count($interfaces = $reflector->getInterfaceNames()) > 0) {
                $result .= sprintf("Interfaces: %s" . PHP_EOL, implode(", ", $interfaces));
            }

            // Display all class traits.
            if (count($traits = $this->getAllTraitNames($reflector)) > 0) {
                $result .= sprintf("Traits: %s" . PHP_EOL, implode(", ", $traits));
            }
        }

        // Display property values.
        if ($info = $this->getPropertyValues($reflector, $value, $level + 1)) {
            $result .=
                str_repeat($this->config["array_indenting"], $level)
                . "Properties:" . PHP_EOL . $info;
        }

        return $result;
    }
protected function printObject ( $ value , $ level = 0 ) { $ reflector = new ReflectionClass ( $ value ) ; // Display the general information about given object. $ result = $ this -> getGeneralObjectInfo ( $ value ) . PHP_EOL ; if ( ! $ this -> config [ "object_limited_info" ] ) { // Display all parent classes. if ( count ( $ parents = $ this -> getAllParentClassNames ( $ reflector ) ) > 0 ) { $ result .= sprintf ( "Classes: %s" . PHP_EOL , implode ( ", " , $ parents ) ) ; } // Display all interfaces (interface inheritance is supported). if ( count ( $ interfaces = $ reflector -> getInterfaceNames ( ) ) > 0 ) { $ result .= sprintf ( "Interfaces: %s" . PHP_EOL , implode ( ", " , $ interfaces ) ) ; } // Display all class traits. if ( count ( $ traits = $ this -> getAllTraitNames ( $ reflector ) ) > 0 ) { $ result .= sprintf ( "Traits: %s" . PHP_EOL , implode ( ", " , $ traits ) ) ; } } // Display property values. if ( $ info = $ this -> getPropertyValues ( $ reflector , $ value , $ level + 1 ) ) { $ result .= str_repeat ( $ this -> config [ "array_indenting" ] , $ level ) . "Properties:" . PHP_EOL . $ info ; } return $ result ; }
Returns a string representation of given object.

@param object $value
@param integer $level
@return string
Returns a string representation of given object .