1 | <?php |
||
17 | abstract class User extends Collector implements StartCollectorInterface, BarRenderableInterface |
||
18 | { |
||
19 | protected $user; |
||
20 | |||
21 | /** |
||
22 | * Fetch data |
||
23 | * |
||
24 | * @return mixed |
||
25 | */ |
||
26 | 6 | public function resolve() |
|
34 | |||
35 | 6 | public function getDataFields() |
|
41 | |||
42 | /** |
||
43 | * The path in the final json |
||
44 | * |
||
45 | * @example |
||
46 | * path /aa/bb |
||
47 | * will be transformed to |
||
48 | * { |
||
49 | * aa : { |
||
50 | * bb: <VALUE OF RESOLVE> |
||
51 | * } |
||
52 | * } |
||
53 | * @return string |
||
54 | */ |
||
55 | 2 | public function getPath() |
|
59 | |||
60 | /** |
||
61 | * @return mixed |
||
62 | */ |
||
63 | 2 | public function getUser() |
|
67 | |||
68 | /** |
||
69 | * @param mixed $user |
||
70 | * |
||
71 | * @return self |
||
72 | */ |
||
73 | 6 | public function setUser($user) |
|
79 | |||
80 | /** |
||
81 | * @return RendererInterface |
||
82 | * |
||
83 | * @throws \RuntimeException |
||
84 | */ |
||
85 | public function getRenderer() |
||
89 | |||
90 | /** |
||
91 | * Return the user user identifier email/username or whatever |
||
92 | * |
||
93 | * @return string |
||
94 | */ |
||
95 | abstract public function getIdentifier(); |
||
96 | |||
97 | /** |
||
98 | * Return the user id or uuid |
||
99 | * |
||
100 | * @return string|int |
||
101 | */ |
||
102 | abstract public function getId(); |
||
103 | |||
104 | /** |
||
105 | * User details for examples roles, timestamps... |
||
106 | * |
||
107 | * @return array |
||
108 | */ |
||
109 | abstract public function getDetails(); |
||
110 | } |
||
111 |