| 1 | <?php |
||
| 18 | class TruePointcut implements Pointcut |
||
| 19 | { |
||
| 20 | use PointcutClassFilterTrait; |
||
| 21 | |||
| 22 | /** |
||
| 23 | * Filter kind |
||
| 24 | * |
||
| 25 | * @var int |
||
| 26 | */ |
||
| 27 | protected $filterKind = 0; |
||
| 28 | |||
| 29 | /** |
||
| 30 | * Default constructor can be used to specify concrete filter kind |
||
| 31 | * |
||
| 32 | * @param int $filterKind Kind of filter, e.g. KIND_METHOD |
||
| 33 | */ |
||
| 34 | 11 | public function __construct($filterKind = self::KIND_ALL) |
|
| 38 | |||
| 39 | /** |
||
| 40 | * Performs matching of point of code |
||
| 41 | * |
||
| 42 | * @param mixed $point Specific part of code, can be any Reflection class |
||
| 43 | * @param null|mixed $context Related context, can be class or namespace |
||
| 44 | * @param null|string|object $instance Invocation instance or string for static calls |
||
| 45 | * @param null|array $arguments Dynamic arguments for method |
||
| 46 | * |
||
| 47 | * @return bool |
||
| 48 | */ |
||
| 49 | public function matches($point, $context = null, $instance = null, array $arguments = null) |
||
| 53 | |||
| 54 | /** |
||
| 55 | * Returns the kind of point filter |
||
| 56 | * |
||
| 57 | * @return integer |
||
| 58 | */ |
||
| 59 | 4 | public function getKind() |
|
| 63 | } |
||
| 64 |