Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. ProxyHelper.php

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\VarExporter

Code

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);
}
RSS feed
Powered by Drupal