Final Class Yiisoft\Yii\Debug\DataNormalizer
| Inheritance | Yiisoft\Yii\Debug\DataNormalizer |
|---|
Public Methods
| Method | Description | Defined By |
|---|---|---|
| __construct() | Yiisoft\Yii\Debug\DataNormalizer | |
| prepareData() | Yiisoft\Yii\Debug\DataNormalizer | |
| prepareDataAndObjectsMap() | Yiisoft\Yii\Debug\DataNormalizer |
Method Details
| public mixed __construct ( array $excludedClasses = [] ) | ||
| $excludedClasses | array | |
public function __construct(array $excludedClasses = [])
{
$this->excludedClasses = array_flip($excludedClasses);
}
| public mixed prepareData ( array $value, integer|null $depth = null ) | ||
| $value | array | |
| $depth | integer|null | |
public function prepareData(array $value, ?int $depth = null): mixed
{
return $this->normalize($value, $depth);
}
| public array prepareDataAndObjectsMap ( array $value, integer|null $depth = null ) | ||
| $value | array | |
| $depth | integer|null | |
public function prepareDataAndObjectsMap(array $value, ?int $depth = null): array
{
$objectsData = $this->makeObjectsData($value);
$objectsMap = array_map(
fn (object $object): mixed => $this->normalize(
$object,
$depth === null ? null : ($depth + 1),
$objectsData,
),
$objectsData,
);
$data = $this->normalize($value, $depth, $objectsData);
return [$data, $objectsMap];
}
Signup or Login in order to comment.