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

Breadcrumb

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

function Mapper::isUserDefinedFunction

Throws

ReflectionException

1 call to Mapper::isUserDefinedFunction()
Mapper::stringToCodeUnits in vendor/sebastian/code-unit/src/Mapper.php

File

vendor/sebastian/code-unit/src/Mapper.php, line 145

Class

Mapper

Namespace

SebastianBergmann\CodeUnit

Code

private function isUserDefinedFunction(string $functionName) : bool {
    if (!function_exists($functionName)) {
        return false;
    }
    try {
        return (new ReflectionFunction($functionName))->isUserDefined();
        // @codeCoverageIgnoreStart
    } catch (\ReflectionException $e) {
        throw new ReflectionException($e->getMessage(), $e->getCode(), $e);
    }
    // @codeCoverageIgnoreEnd
}

API Navigation

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