AloFramework Logger
  • Namespace
  • Class
  • Tree
  • Deprecated
  • Todo

Namespaces

  • AloFramework
    • Log
  • None
  • PHP
  • Psr
    • Log

Classes

  • BaseUser
  • Kint
  • Kint_Decorators_Plain
  • Kint_Decorators_Rich
  • Kint_Objects_Closure
  • Kint_Objects_Smarty
  • Kint_Objects_SplFileInfo
  • Kint_Parsers_ClassMethods
  • Kint_Parsers_ClassStatics
  • Kint_Parsers_Color
  • Kint_Parsers_FsPath
  • Kint_Parsers_Json
  • Kint_Parsers_Microtime
  • Kint_Parsers_objectIterateable
  • Kint_Parsers_SplObjectStorage
  • Kint_Parsers_Timestamp
  • Kint_Parsers_Xml
  • KintObject
  • kintParser
  • kintVariableData
  • User
  • UserManager

Functions

  • d
  • dd
  • ddd
  • s
  • sd
 1 <?php
 2 
 3 class Kint_Parsers_ClassStatics extends kintParser
 4 {
 5     protected function _parse( & $variable )
 6     {
 7         if ( !KINT_PHP53 || !is_object( $variable ) ) return false;
 8 
 9         $extendedValue = array();
10 
11         $reflection = new ReflectionClass( $variable );
12         // first show static values
13         foreach ( $reflection->getProperties( ReflectionProperty::IS_STATIC ) as $property ) {
14             if ( $property->isPrivate() ) {
15                 if ( !method_exists( $property, 'setAccessible' ) ) {
16                     break;
17                 }
18                 $property->setAccessible( true );
19                 $access = "private";
20             } elseif ( $property->isProtected() ) {
21                 $property->setAccessible( true );
22                 $access = "protected";
23             } else {
24                 $access = 'public';
25             }
26 
27             $_      = $property->getValue();
28             $output = kintParser::factory( $_, '$' . $property->getName() );
29 
30             $output->access   = $access;
31             $output->operator = '::';
32             $extendedValue[]  = $output;
33         }
34 
35         foreach ( $reflection->getConstants() as $constant => $val ) {
36             $output = kintParser::factory( $val, $constant );
37 
38             $output->access   = 'constant';
39             $output->operator = '::';
40             $extendedValue[]  = $output;
41         }
42 
43         if ( empty( $extendedValue ) ) return false;
44 
45         $this->value = $extendedValue;
46         $this->type  = 'Static class properties';
47         $this->size  = count( $extendedValue );
48     }
49 }
AloFramework Logger API documentation generated byApiGen 2.8.0