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\Interfaces\AnnotationEntityInterface; |
18
|
|
|
use ReflectionMethod; |
19
|
|
|
|
20
|
|
|
/** |
21
|
|
|
* Container for method metadata generated by method annotations |
22
|
|
|
* |
23
|
|
|
* @author Piotr |
24
|
|
|
*/ |
25
|
|
|
class MetaMethod implements AnnotationEntityInterface |
26
|
|
|
{ |
27
|
|
|
|
28
|
|
|
use \Maslosoft\Addendum\Traits\MetaState; |
29
|
|
|
|
30
|
|
|
/** |
31
|
|
|
* Name of method |
32
|
|
|
* @var string |
33
|
|
|
*/ |
34
|
|
|
public $name = ''; |
35
|
|
|
|
36
|
|
|
/** |
37
|
|
|
* Indicates if method is abstract |
38
|
|
|
* @var bool |
39
|
|
|
*/ |
40
|
|
|
public $isAbstract = false; |
41
|
|
|
|
42
|
|
|
/** |
43
|
|
|
* Indicates if method is static |
44
|
|
|
* @var bool |
45
|
|
|
*/ |
46
|
|
|
public $isStatic = false; |
47
|
|
|
|
48
|
|
|
/** |
49
|
|
|
* Class constructor, set some basic metadata |
50
|
|
|
* @param ReflectionMethod $info |
51
|
|
|
*/ |
52
|
5 |
|
public function __construct(ReflectionMethod $info = null) |
53
|
|
|
{ |
54
|
|
|
// For internal use |
55
|
5 |
|
if (null === $info) |
56
|
5 |
|
{ |
57
|
|
|
return; |
58
|
|
|
} |
59
|
5 |
|
$this->name = $info->name; |
60
|
5 |
|
$this->isAbstract = $info->isAbstract(); |
61
|
5 |
|
$this->isStatic = $info->isStatic(); |
62
|
5 |
|
} |
63
|
|
|
|
64
|
|
|
public function __get($name) |
65
|
|
|
{ |
66
|
|
|
return null; |
67
|
|
|
} |
68
|
|
|
|
69
|
|
|
} |
70
|
|
|
|