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

Breadcrumb

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

function GPBUtil::getPreviouslyUnreservedClassNamePrefix

2 calls to GPBUtil::getPreviouslyUnreservedClassNamePrefix()
GPBUtil::getFullClassName in vendor/google/protobuf/src/Google/Protobuf/Internal/GPBUtil.php
GPBUtil::getPreviouslyUnreservedClassNameWithoutPackage in vendor/google/protobuf/src/Google/Protobuf/Internal/GPBUtil.php

File

vendor/google/protobuf/src/Google/Protobuf/Internal/GPBUtil.php, line 284

Class

GPBUtil

Namespace

Google\Protobuf\Internal

Code

private static function getPreviouslyUnreservedClassNamePrefix($classname, $file_proto) {
    $previously_unreserved_words = array(
        "readonly" => 0,
    );
    if (array_key_exists(strtolower($classname), $previously_unreserved_words)) {
        $option = $file_proto->getOptions();
        $prefix = is_null($option) ? "" : $option->getPhpClassPrefix();
        if ($prefix !== "") {
            return $prefix;
        }
        return "";
    }
    return self::getClassNamePrefix($classname, $file_proto);
}

API Navigation

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