You are here

public function IgnoreAnnotation::__construct in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/IgnoreAnnotation.php \Doctrine\Common\Annotations\Annotation\IgnoreAnnotation::__construct()

Constructor.

Parameters

array $values:

Throws

\RuntimeException

File

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

Class

IgnoreAnnotation
Annotation that can be used to signal to the parser to ignore specific annotations during the parsing process.

Namespace

Doctrine\Common\Annotations\Annotation

Code

public function __construct(array $values) {
  if (is_string($values['value'])) {
    $values['value'] = array(
      $values['value'],
    );
  }
  if (!is_array($values['value'])) {
    throw new \RuntimeException(sprintf('@IgnoreAnnotation expects either a string name, or an array of strings, but got %s.', json_encode($values['value'])));
  }
  $this->names = $values['value'];
}