PHP Class Symfony\Component\VarDumper\Caster\Caster

Author: Nicolas Grekas ([email protected])
Mostra file Open project: symfony/var-dumper Class Usage Examples

Public Methods

Method Description
castObject ( object $obj, ReflectionClass $reflector ) : array Casts objects to arrays and adds the dynamic property prefix.
castPhpIncompleteClass ( __PHP_Incomplete_Class $c, array $a, Symfony\Component\VarDumper\Cloner\Stub $stub, $isNested )
filter ( array $a, integer $filter, array $listedProperties = [], &$count ) : array Filters out the specified properties.

Method Details

castObject() public static method

Casts objects to arrays and adds the dynamic property prefix.
public static castObject ( object $obj, ReflectionClass $reflector ) : array
$obj object The object to cast
$reflector ReflectionClass The class reflector to use for inspecting the object definition
return array The array-cast of the object, with prefixed dynamic properties

castPhpIncompleteClass() public static method

public static castPhpIncompleteClass ( __PHP_Incomplete_Class $c, array $a, Symfony\Component\VarDumper\Cloner\Stub $stub, $isNested )
$c __PHP_Incomplete_Class
$a array
$stub Symfony\Component\VarDumper\Cloner\Stub

filter() public static method

By default, a single match in the $filter bit field filters properties out, following an "or" logic. When EXCLUDE_STRICT is set, an "and" logic is applied: all bits must match for a property to be removed.
public static filter ( array $a, integer $filter, array $listedProperties = [], &$count ) : array
$a array The array containing the properties to filter
$filter integer A bit field of Caster::EXCLUDE_* constants specifying which properties to filter out
$listedProperties array List of properties to exclude when Caster::EXCLUDE_VERBOSE is set, and to preserve when Caster::EXCLUDE_NOT_IMPORTANT is set
return array The filtered array