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

Breadcrumb

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

function ProxyHelper::exportSymbol

File

vendor/symfony/var-exporter/ProxyHelper.php, line 399

Class

ProxyHelper
@author Nicolas Grekas <p@tchwork.com>

Namespace

Symfony\Component\VarExporter

Code

private static function exportSymbol(string $symbol, bool $mightBeRootConst, string $namespace) : string {
    if (!$mightBeRootConst || false === ($ns = strrpos($symbol, '\\')) || substr($symbol, 0, $ns) !== $namespace || \defined($symbol) || !\defined(substr($symbol, $ns + 1))) {
        return '\\' . $symbol;
    }
    return '\\' . substr($symbol, $ns + 1);
}
RSS feed
Powered by Drupal