*/ final class Inject { /** * Entry name. * @var string */ private $name; /** * Parameters, indexed by the parameter number (index) or name. * * Used if the annotation is set on a method * @var array */ private $parameters = []; /** * @throws InvalidAnnotation */ public function __construct(array $values) { // Process the parameters as a list AND as a parameter array (we don't know on what the annotation is) // @Inject(name="foo") if (isset($values['name']) && is_string($values['name'])) { $this->name = $values['name']; return; } // @Inject if (! isset($values['value'])) { return; } $values = $values['value']; // @Inject("foo") if (is_string($values)) { $this->name = $values; } // @Inject({...}) on a method if (is_array($values)) { foreach ($values as $key => $value) { if (! is_string($value)) { throw new InvalidAnnotation(sprintf( '@Inject({"param" = "value"}) expects "value" to be a string, %s given.', json_encode($value) )); } $this->parameters[$key] = $value; } } } /** * @return string|null Name of the entry to inject */ public function getName() { return $this->name; } /** * @return array Parameters, indexed by the parameter number (index) or name */ public function getParameters(): array { return $this->parameters; } } __halt_compiler();----SIGNATURE:----baNpKgkt7I175aHjXdUwTPJELNwEAawldL87ouqve6sVNNv0aRFX5/n3XuM8O3q+sIXuJQNBznfL0tohasX3xabtjtjlTZvRKgQnczpHqDHtEaK+g2sYrTpFhMMgd4sFs+SZqAn8bJGXjskUWHQ8m8+VZhYeRKtdKgzOCqfPuQASgs0Q+OkHYjOgjgwZ9TfaDoylW6ITbaX/ecYcMQ+1bWYMCzVbTcrzS8PDc1dNiSDFrlygVkL7A9u3rrRmql6IwbbzLnfCtU1JL5PfXaJyEwjsefqYeeVX59k27TtgWK6VQUuXyPn5ueau36b4AppeaC8Ngm/FPbvUpIFZvjZIIpQT3oc0R39240q8O4/FPzHMs0ysH4vEsKbrS6jvxA8FUhHcHbgs4Zk6ysrL+ctd2EQG3vrWfOON9GrxzPfsmxiZ/gAvqdeATT4T9yB12N2D0sqkMFpq9DPRBxjVfCPr2QSjugzwgl50h43vCE4sJAUxEkKra31zC5vKGmyFUpRP6tQq/ZX7QRV/u/m9jFLb2IaBU6g+Dx3PfIP+scLpQMUkQVvhW2LGN47p4YhEzTdRDnc3OpcHHct5NHzarrxmZKQw2iSuQyjzVr9s+itBKr3S7DfCeKiZitWLc4F/LsSkm0Nc38WfEnNeEgw1EpzyXtDtDO29E/RajfDPg9QRmFc=----ATTACHMENT:----MjEwNTQ4MDg4Mzc3NzY3NCA4NDIyOTI4MDk5MjU3NzE1IDYzNzkyMjYwOTk2MTAzODA=