1 <?php
2
3 namespace Skimia\ApiFusion\Annotations\ApiRouting\Annotations;
4
5 /**
6 * @Annotation
7 */
8 class ApiResource
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 $values;
30
31 /**
32 * Create a new annotation instance.
33 *
34 * @param array $values
35 *
36 * @return void
37 */
38 public function __construct(array $values = [])
39 {
40 $this->resourceEndPoint = $values['value'];
41 $this->version = $values['version'];
42
43 unset($values['value'], $values['version']);
44
45 $this->values = (array) $values;
46 }
47 }
48