You are here

class Annotation in Plug 7

Annotations class.

@author Benjamin Eberlei <kontakt@beberlei.de> @author Guilherme Blanco <guilhermeblanco@hotmail.com> @author Jonathan Wage <jonwage@gmail.com> @author Roman Borschel <roman@code-factory.org>

Hierarchy

Expanded class hierarchy of Annotation

1 file declares its use of Annotation
ExampleAnnotationClass.php in lib/doctrine/common/tests/Doctrine/Tests/Common/Reflection/ExampleAnnotationClass.php
1 string reference to 'Annotation'
plug_example_menu in modules/plug_example/plug_example.module
Implements hook_menu().

File

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

Namespace

Doctrine\Common\Annotations
View source
class Annotation {

  /**
   * Value property. Common among all derived classes.
   *
   * @var string
   */
  public $value;

  /**
   * Constructor.
   *
   * @param array $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.
   *
   * @param string $name Unknown property name.
   *
   * @throws \BadMethodCallException
   */
  public function __get($name) {
    throw new \BadMethodCallException(sprintf("Unknown property '%s' on annotation '%s'.", $name, get_class($this)));
  }

  /**
   * Error handler for unknown property mutator in Annotation class.
   *
   * @param string $name  Unknown property name.
   * @param mixed  $value Property value.
   *
   * @throws \BadMethodCallException
   */
  public function __set($name, $value) {
    throw new \BadMethodCallException(sprintf("Unknown property '%s' on annotation '%s'.", $name, get_class($this)));
  }

}

Members

Namesort descending Modifiers Type Description Overrides
Annotation::$value public property Value property. Common among all derived classes.
Annotation::__construct final public function Constructor.
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.