Final Class Yiisoft\Yii\Debug\DataNormalizer
| Inheritance | Yiisoft\ |
|---|
Public Methods
| Method | Description | Defined By |
|---|---|---|
| __construct() | Yiisoft\ |
|
| prepareData() | Yiisoft\ |
|
| prepareDataAndObjectsMap() | Yiisoft\ |
Method Details
| public mixed __construct ( array $excludedClasses = [] ) | ||
| $excludedClasses | array | |
public function __construct(array $excludedClasses = [])
{
$this->excludedClasses = array_flip($excludedClasses);
}
| public mixed prepareData ( array $value, ?int $depth = null ) | ||
| $value | array | |
| $depth | ?int | |
public function prepareData(array $value, ?int $depth = null): mixed
{
return $this->normalize($value, $depth);
}
| public array prepareDataAndObjectsMap ( array $value, ?int $depth = null ) | ||
| $value | array | |
| $depth | ?int | |
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];
}
User Contributed Notes
Leave a comment
Join the conversation to share a note.