1 <?php
2
3 namespace Skimia\ApiFusion\Annotations\ApiRouting\Annotations;
4
5 /**
6 * @Annotation
7 */
8 class ApiEndpoint
9 {
10 /**
11 * The events the annotation hears.
12 *
13 * @var array
14 */
15 public $resourceEndPoint;
16
17 /**
18 * The api version.
19 *
20 * @var array
21 */
22 public $version;
23
24 /**
25 * The events the annotation hears.
26 *
27 * @var array
28 */
29 public $verb;
30
31 /**
32 * The events the annotation hears.
33 *
34 * @var array
35 */
36 public $values;
37
38 /**
39 * Create a new annotation instance.
40 *
41 * @param array $values
42 *
43 * @return void
44 */
45 public function __construct(array $values = [])
46 {
47 $this->resourceEndPoint = $values['value'];
48 $this->version = $values['version'];
49 $this->verb = isset($values['verb']) ? $values['verb'] : 'get';
50
51 unset($values['value'], $values['version'],$values['verb']);
52
53 $this->values = (array) $values;
54 }
55 }
56