1 | <?php |
||
17 | class BaseComponent |
||
18 | { |
||
19 | /** @var AuthOptions $authOptions */ |
||
20 | protected $authOptions; |
||
21 | |||
22 | /** @var EntityManager $entityManager */ |
||
23 | protected $entityManager; |
||
24 | |||
25 | /** @var RepositoryRegistry $repositoryRegistry */ |
||
26 | protected $repositoryRegistry; |
||
27 | |||
28 | /** |
||
29 | * AuthManager constructor. |
||
30 | * @param AuthOptions $authOptions |
||
31 | */ |
||
32 | public function __construct(AuthOptions $authOptions) |
||
38 | |||
39 | /** |
||
40 | * Insert or update entity |
||
41 | * @param object $entity |
||
42 | * @return object |
||
43 | * @throws DatabaseException |
||
44 | */ |
||
45 | protected function saveEntity($entity) |
||
55 | |||
56 | /** |
||
57 | * Checks access status |
||
58 | * @param integer $userId |
||
59 | * @param string $permissionName |
||
60 | * @return bool |
||
61 | * @throws InvalidArgumentException |
||
62 | * @throws \Doctrine\ORM\Query\QueryException |
||
63 | */ |
||
64 | public function checkAccess($userId, $permissionName) |
||
97 | } |
||
98 |
When comparing two booleans, it is generally considered safer to use the strict comparison operator.