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

Breadcrumb

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

function NameContext::normalizeConstName

1 call to NameContext::normalizeConstName()
NameContext::getPossibleNames in vendor/nikic/php-parser/lib/PhpParser/NameContext.php
Get possible ways of writing a fully qualified name (e.g., by making use of aliases).

File

vendor/nikic/php-parser/lib/PhpParser/NameContext.php, line 273

Class

NameContext

Namespace

PhpParser

Code

private function normalizeConstName(string $name) : string {
    $nsSep = strrpos($name, '\\');
    if (false === $nsSep) {
        return $name;
    }
    // Constants have case-insensitive namespace and case-sensitive short-name
    $ns = substr($name, 0, $nsSep);
    $shortName = substr($name, $nsSep + 1);
    return strtolower($ns) . '\\' . $shortName;
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal