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

Breadcrumb

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

class Annotation

Same name in this branch
  1. 11.1.x vendor/slevomat/coding-standard/SlevomatCodingStandard/Helpers/Annotation.php \SlevomatCodingStandard\Helpers\Annotation
  2. 11.1.x vendor/google/protobuf/src/Google/Protobuf/Internal/GeneratedCodeInfo/Annotation.php \Google\Protobuf\Internal\GeneratedCodeInfo\Annotation

Annotations class.

Hierarchy

  • class \Doctrine\Common\Annotations\Annotation

Expanded class hierarchy of Annotation

1 string reference to 'Annotation'
AnnotationHelper::processDocComment in vendor/phpstan/phpstan-phpunit/src/Rules/PHPUnit/AnnotationHelper.php
*

File

vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation.php, line 12

Namespace

Doctrine\Common\Annotations
View source
class Annotation {
    
    /**
     * Value property. Common among all derived classes.
     *
     * @var mixed
     */
    public $value;
    
    /** @param array<string, mixed> $data Key-value for properties to be defined in this class. */
    public final function __construct(array $data) {
        foreach ($data as $key => $value) {
            $this->{$key} = $value;
        }
    }
    
    /**
     * Error handler for unknown property accessor in Annotation class.
     *
     * @throws BadMethodCallException
     */
    public function __get(string $name) {
        throw new BadMethodCallException(sprintf("Unknown property '%s' on annotation '%s'.", $name, static::class));
    }
    
    /**
     * Error handler for unknown property mutator in Annotation class.
     *
     * @param mixed $value Property value.
     *
     * @throws BadMethodCallException
     */
    public function __set(string $name, $value) {
        throw new BadMethodCallException(sprintf("Unknown property '%s' on annotation '%s'.", $name, static::class));
    }

}

Members

Title Sort descending Modifiers Object type Summary
Annotation::$value public property Value property. Common among all derived classes.
Annotation::__construct final public function
Annotation::__get public function Error handler for unknown property accessor in Annotation class.
Annotation::__set public function Error handler for unknown property mutator in Annotation class.

API Navigation

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