1 | <?php |
||
16 | class CachedUserManager extends UserManagerAbstract implements UserManagerInterface |
||
17 | { |
||
18 | /** |
||
19 | * @var CacheHelperInterface |
||
20 | */ |
||
21 | private $cacheHelper; |
||
22 | |||
23 | /** |
||
24 | * @var string |
||
25 | */ |
||
26 | private $cachePrefix; |
||
27 | |||
28 | public function __construct(CacheHelperInterface $cacheHelper, string $cachePrefix ) |
||
33 | |||
34 | /** |
||
35 | * {@inheritdoc} |
||
36 | */ |
||
37 | public function getPermissions(UserPermissionInterface $user = null) : array |
||
50 | |||
51 | /** |
||
52 | * {@inheritdoc} |
||
53 | */ |
||
54 | public function invalidatePermissions(UserPermissionInterface $user) : void |
||
59 | } |
If a variable is not always an object, we recommend to add an additional type check to ensure your method call is safe: