Constructor.
array $data An array of key/value parameters.:
public function __construct(array $data) {
$this->requirements = array();
$this->options = array();
$this->defaults = array();
if (isset($data['value'])) {
$data['pattern'] = $data['value'];
unset($data['value']);
}
foreach ($data as $key => $value) {
$method = 'set' . $key;
if (!method_exists($this, $method)) {
throw new \BadMethodCallException(sprintf("Unknown property '%s' on annotation '%s'.", $key, get_class($this)));
}
$this
->{$method}($value);
}
}