class Kint_Parsers_ClassStatics in Devel 8
Same name and namespace in other branches
- 8.2 kint/kint/parsers/custom/classstatics.php \Kint_Parsers_ClassStatics
Hierarchy
- class \kintVariableData
- class \kintParser
- class \Kint_Parsers_ClassStatics
- class \kintParser
Expanded class hierarchy of Kint_Parsers_ClassStatics
File
- kint/
kint/ parsers/ custom/ classstatics.php, line 3
View source
class Kint_Parsers_ClassStatics extends kintParser {
protected function _parse(&$variable) {
if (!KINT_PHP53 || !is_object($variable)) {
return false;
}
$extendedValue = array();
$reflection = new ReflectionClass($variable);
// first show static values
foreach ($reflection
->getProperties(ReflectionProperty::IS_STATIC) as $property) {
if ($property
->isPrivate()) {
if (!method_exists($property, 'setAccessible')) {
break;
}
$property
->setAccessible(true);
$access = "private";
}
elseif ($property
->isProtected()) {
$property
->setAccessible(true);
$access = "protected";
}
else {
$access = 'public';
}
$_ = $property
->getValue();
$output = kintParser::factory($_, '$' . $property
->getName());
$output->access = $access;
$output->operator = '::';
$extendedValue[] = $output;
}
foreach ($reflection
->getConstants() as $constant => $val) {
$output = kintParser::factory($val, $constant);
$output->access = 'constant';
$output->operator = '::';
$extendedValue[] = $output;
}
if (empty($extendedValue)) {
return false;
}
$this->value = $extendedValue;
$this->type = 'Static class properties';
$this->size = count($extendedValue);
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
kintParser:: |
private static | property | ||
kintParser:: |
private static | property | ||
kintParser:: |
private static | property | ||
kintParser:: |
private static | property | ||
kintParser:: |
private static | property | ||
kintParser:: |
private static | property | ||
kintParser:: |
private static | property | ||
kintParser:: |
private static | property | ||
kintParser:: |
public static | function | ||
kintParser:: |
final public static | function | * the only public entry point to return a parsed representation of a variable * * @static * * | |
kintParser:: |
public static | function | ||
kintParser:: |
private static | function | ||
kintParser:: |
private static | function | ||
kintParser:: |
private static | function | ||
kintParser:: |
private static | function | ||
kintParser:: |
private static | function | ||
kintParser:: |
private static | function | ||
kintParser:: |
private static | function | ||
kintParser:: |
private static | function | ||
kintParser:: |
private static | function | ||
kintParser:: |
private static | function | ||
kintParser:: |
private static | function | ||
kintParser:: |
private static | function | ||
kintParser:: |
private static | function | ||
kintVariableData:: |
public | property | @var string | |
kintVariableData:: |
public | property | * * the array is a separate possible representation of the dumped var | |
kintVariableData:: |
public | property | @var string | |
kintVariableData:: |
public | property | @var string | |
kintVariableData:: |
public | property | @var int | |
kintVariableData:: |
public | property | @var string | |
kintVariableData:: |
public | property | @var string inline value | |
kintVariableData:: |
public | property | @var kintVariableData[] array of alternative representations for same variable, don't use in custom parsers | |
kintVariableData:: |
private static | property | ||
kintVariableData:: |
protected static | function | ||
kintVariableData:: |
protected static | function | * returns whether the array: * 1) is numeric and * 2) in sequence starting from zero * * | |
kintVariableData:: |
protected static | function | ||
kintVariableData:: |
protected static | function | ||
Kint_Parsers_ClassStatics:: |
protected | function |
* main and usually single method a custom parser must implement
*
* Overrides kintParser:: |