1 | <?php |
||
24 | class DefinitionData extends Base |
||
25 | { |
||
26 | |||
27 | const METHOD = 'method'; |
||
28 | const PROPERTY = 'property'; |
||
29 | |||
30 | /** |
||
31 | * @readwrite |
||
32 | * @var string |
||
33 | */ |
||
34 | protected $className; |
||
35 | |||
36 | /** |
||
37 | * @readwrite |
||
38 | * @var array |
||
39 | */ |
||
40 | protected $arguments = []; |
||
41 | |||
42 | /** |
||
43 | * @readwrite |
||
44 | * @var array |
||
45 | */ |
||
46 | protected $calls = []; |
||
47 | |||
48 | /** |
||
49 | * Definition Data |
||
50 | * |
||
51 | * @param string $className |
||
52 | * @param array $arguments |
||
53 | * @param array $calls |
||
54 | */ |
||
55 | public function __construct($className, array $arguments = [], array $calls = []) |
||
64 | |||
65 | /** |
||
66 | * Adds a call to the stack |
||
67 | * |
||
68 | * @param string $type |
||
69 | * @param string $name |
||
70 | * @param array $arguments |
||
71 | * |
||
72 | * @return DefinitionData |
||
73 | */ |
||
74 | public function addCall($type, $name, $arguments = []) |
||
83 | |||
84 | /** |
||
85 | * Updated the arguments of the last defined method |
||
86 | * |
||
87 | * @param array $arguments |
||
88 | * |
||
89 | * @return DefinitionData |
||
90 | */ |
||
91 | public function updateLastMethod($arguments) |
||
95 | |||
96 | /** |
||
97 | * Updated the arguments of the last defined property |
||
98 | * |
||
99 | * @param mixed $value |
||
100 | * |
||
101 | * @return DefinitionData |
||
102 | */ |
||
103 | public function updateLastProperty($value) |
||
107 | |||
108 | /** |
||
109 | * @param string $type |
||
110 | * @param mixed $arguments |
||
111 | * |
||
112 | * @return DefinitionData |
||
113 | */ |
||
114 | protected function update($type, $arguments) |
||
125 | } |
||
126 |