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

Breadcrumb

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

function Target::getParsedName

File

vendor/symfony/dependency-injection/Attribute/Target.php, line 32

Class

Target
An attribute to tell how a dependency is used and hint named autowiring aliases.

Namespace

Symfony\Component\DependencyInjection\Attribute

Code

public function getParsedName() : string {
    if (null === $this->name) {
        throw new LogicException(\sprintf('Cannot parse the name of a #[Target] attribute that has not been resolved. Did you forget to call "%s::parseName()"?', __CLASS__));
    }
    return lcfirst(str_replace(' ', '', ucwords(preg_replace('/[^a-zA-Z0-9\\x7f-\\xff]++/', ' ', $this->name))));
}
RSS feed
Powered by Drupal