@@ 27-45 (lines=19) @@ | ||
24 | /** |
|
25 | * Class LogExceptionsPointCut |
|
26 | */ |
|
27 | class LogExceptionsPointCut extends CommonPointCut implements PointCutable |
|
28 | { |
|
29 | /** @var string */ |
|
30 | protected $annotation = LogExceptions::class; |
|
31 | ||
32 | /** |
|
33 | * @param Container $app |
|
34 | * |
|
35 | * @return \Ray\Aop\Pointcut |
|
36 | */ |
|
37 | public function configure(Container $app) |
|
38 | { |
|
39 | $interceptor = new LogExceptionsInterceptor; |
|
40 | $interceptor->setLogger($app['Psr\Log\LoggerInterface']); |
|
41 | $this->setInterceptor($interceptor); |
|
42 | ||
43 | return $this->withAnnotatedAnyInterceptor(); |
|
44 | } |
|
45 | } |
|
46 |
@@ 27-45 (lines=19) @@ | ||
24 | /** |
|
25 | * Class LoggablePointCut |
|
26 | */ |
|
27 | class LoggablePointCut extends CommonPointCut implements PointCutable |
|
28 | { |
|
29 | /** @var string */ |
|
30 | protected $annotation = Loggable::class; |
|
31 | ||
32 | /** |
|
33 | * @param Container $app |
|
34 | * |
|
35 | * @return \Ray\Aop\Pointcut |
|
36 | */ |
|
37 | public function configure(Container $app) |
|
38 | { |
|
39 | $interceptor = new LoggableInterceptor; |
|
40 | $interceptor->setLogger($app['Psr\Log\LoggerInterface']); |
|
41 | $this->setInterceptor($interceptor); |
|
42 | ||
43 | return $this->withAnnotatedAnyInterceptor(); |
|
44 | } |
|
45 | } |
|
46 |
@@ 28-47 (lines=20) @@ | ||
25 | /** |
|
26 | * Class QueryLogPointCut |
|
27 | */ |
|
28 | class QueryLogPointCut extends CommonPointCut implements PointCutable |
|
29 | { |
|
30 | /** @var string */ |
|
31 | protected $annotation = QueryLog::class; |
|
32 | ||
33 | /** |
|
34 | * @param Container $app |
|
35 | * |
|
36 | * @return \Ray\Aop\Pointcut |
|
37 | */ |
|
38 | public function configure(Container $app) |
|
39 | { |
|
40 | $interceptor = new QueryLogInterceptor; |
|
41 | $interceptor->setLogger($app['Psr\Log\LoggerInterface']); |
|
42 | $interceptor->setDispatcher($app['Illuminate\Contracts\Events\Dispatcher']); |
|
43 | $this->setInterceptor($interceptor); |
|
44 | ||
45 | return $this->withAnnotatedAnyInterceptor(); |
|
46 | } |
|
47 | } |
|
48 |