function ProxyHelper::exportPropertyScopes
2 calls to ProxyHelper::exportPropertyScopes()
- ProxyHelper::generateLazyGhost in vendor/
symfony/ var-exporter/ ProxyHelper.php - Helps generate lazy-loading ghost objects.
- ProxyHelper::generateLazyProxy in vendor/
symfony/ var-exporter/ ProxyHelper.php - Helps generate lazy-loading virtual proxies.
File
-
vendor/
symfony/ var-exporter/ ProxyHelper.php, line 348
Class
- ProxyHelper
- @author Nicolas Grekas <p@tchwork.com>
Namespace
Symfony\Component\VarExporterCode
private static function exportPropertyScopes(string $parent) : string {
$propertyScopes = Hydrator::$propertyScopes[$parent] ??= Hydrator::getPropertyScopes($parent);
uksort($propertyScopes, 'strnatcmp');
foreach ($propertyScopes as $k => $v) {
unset($propertyScopes[$k][3]);
}
$propertyScopes = VarExporter::export($propertyScopes);
$propertyScopes = str_replace(VarExporter::export($parent), 'parent::class', $propertyScopes);
$propertyScopes = preg_replace("/(?|(,)\n( ) |\n |,\n (\\]))/", '$1$2', $propertyScopes);
return str_replace("\n", "\n ", $propertyScopes);
}