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
|
55 |
|
public function __construct($config) |
32
|
|
|
{ |
33
|
55 |
|
assert(isset($config['addendum']), new ConfigurationException('Matcher plugins require `addendum`')); |
34
|
55 |
|
assert(isset($config['reflection']), new ConfigurationException('Matcher plugins require `reflection`')); |
35
|
55 |
|
$this->addendum = $config['addendum']; |
36
|
55 |
|
$this->reflection = $config['reflection']; |
37
|
55 |
|
} |
38
|
|
|
|
39
|
|
|
/** |
40
|
|
|
* Addendum instance |
41
|
|
|
* @var Addendum |
42
|
|
|
*/ |
43
|
|
|
public $addendum = null; |
44
|
|
|
|
45
|
|
|
/** |
46
|
|
|
* |
47
|
|
|
* @var ReflectionAnnotatedClass|ReflectionAnnotatedMethod|ReflectionAnnotatedProperty |
48
|
|
|
*/ |
49
|
|
|
public $reflection = null; |
50
|
|
|
|
51
|
|
|
} |
52
|
|
|
|