-
Notifications
You must be signed in to change notification settings - Fork 104
/
Copy pathTestPlugin.php
47 lines (39 loc) · 1.12 KB
/
TestPlugin.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<?php
namespace Foo\Bar\Plugin;
use Foo\Bar\Service\SimpleService;
class TestPlugin
{
/**
* @param \Foo\Bar\Service\SimpleService $subject
* @param int $param1
* @param string $param2
* @return array
*/
public function beforeExecute(\Foo\Bar\Service\SimpleService $subject, int $param1, string $param2)
{
// TODO: Implement plugin method.
return [$param1, $param2];
}
/**
* @param \Foo\Bar\Service\SimpleService $subject
* @param callable $proceed
* @param int $param1
* @param string $param2
*/
public function aroundExecute(\Foo\Bar\Service\SimpleService $subject, callable $proceed, int $param1, string $param2)
{
// TODO: Implement plugin method.
return $proceed($param1, $param2);
}
/**
* @param \Foo\Bar\Service\SimpleService $subject
* @param $result
* @param int $param1
* @param string $param2
*/
public function afterExecute(\Foo\Bar\Service\SimpleService $subject, $result, int $param1, string $param2)
{
// TODO: Implement plugin method.
return $result;
}
}