use PDO;
class CategoryReader extends GenericReader
{ public function getList($identifiers) { $categories = parent::
getList($identifiers);
$parents =
$this->
getParents($categories);
foreach ($categories as &
$row) { $path =
array_reverse(array_filter(explode('|',
$row['path'
])));
$row['parents'
] =
$this->
getPathParents($parents,
$path);
} return $categories;
} /**
* @param array<string> $parents
* @param string[] $path
*
* @return array<string>
*/