1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
/** |
4
|
|
|
* This software package is licensed under AGPL, Commercial license. |
5
|
|
|
* |
6
|
|
|
* @package maslosoft/addendum |
7
|
|
|
* @licence AGPL, Commercial |
8
|
|
|
* @copyright Copyright (c) Piotr Masełkowski <[email protected]> (Meta container, further improvements, bugfixes) |
9
|
|
|
* @copyright Copyright (c) Maslosoft (Meta container, further improvements, bugfixes) |
10
|
|
|
* @copyright Copyright (c) Jan Suchal (Original version, builder, parser) |
11
|
|
|
* @link http://maslosoft.com/addendum/ - maslosoft addendum |
12
|
|
|
* @link https://code.google.com/p/addendum/ - original addendum project |
13
|
|
|
*/ |
14
|
|
|
|
15
|
|
|
namespace Maslosoft\Addendum\Collections; |
16
|
|
|
|
17
|
|
|
use Maslosoft\Addendum\Addendum; |
18
|
|
|
use Maslosoft\Addendum\Exceptions\ConfigurationException; |
19
|
|
|
use Maslosoft\Addendum\Reflection\ReflectionAnnotatedClass; |
20
|
|
|
use Maslosoft\Addendum\Reflection\ReflectionAnnotatedMethod; |
21
|
|
|
use Maslosoft\Addendum\Reflection\ReflectionAnnotatedProperty; |
22
|
|
|
|
23
|
|
|
/** |
24
|
|
|
* MatcherConfig |
25
|
|
|
* |
26
|
|
|
* @author Piotr Maselkowski <pmaselkowski at gmail.com> |
27
|
|
|
*/ |
28
|
|
|
class MatcherConfig |
29
|
|
|
{ |
30
|
|
|
|
31
|
47 |
|
public function __construct($config) |
32
|
|
|
{ |
33
|
47 |
|
if(!isset($config['addendum'])) |
34
|
47 |
|
{ |
35
|
|
|
throw new ConfigurationException('Matcher plugins require `addendum`'); |
36
|
|
|
} |
37
|
47 |
|
if(!isset($config['reflection'])) |
38
|
47 |
|
{ |
39
|
|
|
throw new ConfigurationException('Matcher plugins require `reflection`'); |
40
|
|
|
} |
41
|
47 |
|
$this->addendum = $config['addendum']; |
42
|
47 |
|
$this->reflection = $config['reflection']; |
43
|
47 |
|
} |
44
|
|
|
|
45
|
|
|
/** |
46
|
|
|
* Addendum instance |
47
|
|
|
* @var Addendum |
48
|
|
|
*/ |
49
|
|
|
public $addendum = null; |
50
|
|
|
|
51
|
|
|
/** |
52
|
|
|
* |
53
|
|
|
* @var ReflectionAnnotatedClass|ReflectionAnnotatedMethod|ReflectionAnnotatedProperty |
54
|
|
|
*/ |
55
|
|
|
public $reflection = null; |
56
|
|
|
|
57
|
|
|
} |
58
|
|
|
|