1 | <?php |
||
36 | class PointcutPointcut extends AbstractPointcut |
||
37 | { |
||
38 | |||
39 | /** |
||
40 | * Connector for referencing of several pointcuts at once |
||
41 | * |
||
42 | * @var string EXPRESSION_CONNECTOR |
||
43 | */ |
||
44 | const EXPRESSION_CONNECTOR = ','; |
||
45 | |||
46 | /** |
||
47 | * Whether or not the pointcut is considered static, meaning is has to be weaved and evaluated during runtime |
||
48 | * anyway |
||
49 | * |
||
50 | * @var boolean IS_STATIC |
||
51 | */ |
||
52 | const IS_STATIC = false; |
||
53 | |||
54 | /** |
||
55 | * The type of this pointcut |
||
56 | * |
||
57 | * @var string TYPE |
||
58 | */ |
||
59 | const TYPE = 'pointcut'; |
||
60 | |||
61 | /** |
||
62 | * Pointcuts referenced by this pointcut's expression |
||
63 | * |
||
64 | * @var \AppserverIo\Doppelgaenger\Interfaces\PointcutInterface[] $referencedPointcuts |
||
65 | */ |
||
66 | protected $referencedPointcuts; |
||
67 | |||
68 | /** |
||
69 | * Magic __clone method to allow for deep clones of pointcut instances |
||
70 | * |
||
71 | * @return void |
||
72 | */ |
||
73 | public function __clone() |
||
79 | |||
80 | /** |
||
81 | * Returns a string representing a boolean condition which can be used to determine if |
||
82 | * the pointcut has to be executed |
||
83 | * |
||
84 | * @return string |
||
85 | */ |
||
86 | public function getConditionString() |
||
90 | |||
91 | /** |
||
92 | * Returns a string representing the actual execution of the pointcut logic |
||
93 | * |
||
94 | * @param string|null $assignTo Should the result be assigned and stored for later use? If so, to what? |
||
95 | * |
||
96 | * @return string |
||
97 | */ |
||
98 | public function getExecutionString($assignTo = null) |
||
102 | |||
103 | /** |
||
104 | * Getter for the $referencedPointcuts property |
||
105 | * |
||
106 | * @return array |
||
107 | */ |
||
108 | public function getReferencedPointcuts() |
||
112 | |||
113 | /** |
||
114 | * Whether or not the pointcut matches a given candidate. |
||
115 | * Weave pointcuts will always return true, as they do not pose any condition |
||
116 | * |
||
117 | * @param mixed $candidate Candidate to match against the pointcuts match pattern (getMatchPattern()) |
||
118 | * |
||
119 | * @return boolean |
||
120 | */ |
||
121 | public function matches($candidate) |
||
137 | |||
138 | /** |
||
139 | * Setter for the $referencedPointcuts property |
||
140 | * |
||
141 | * @param \AppserverIo\Doppelgaenger\Interfaces\PointcutInterface[] $referencedPointcuts Pointcuts referenced by this pointcut's expression |
||
142 | * |
||
143 | * @return null |
||
144 | */ |
||
145 | public function setReferencedPointcuts(array $referencedPointcuts) |
||
149 | } |
||
150 |
If you access a property on an interface, you most likely code against a concrete implementation of the interface.
Available Fixes
Adding an additional type check:
Changing the type hint: