1 | <?php |
||
19 | class MiddlewareScopes extends AbstractFormDefinitionComponent |
||
20 | { |
||
21 | /** |
||
22 | * @todo desc |
||
23 | * |
||
24 | * List of interface names that do implement: |
||
25 | * |
||
26 | * @see \Romm\Formz\Middleware\Scope\ScopeInterface |
||
27 | * |
||
28 | * @var array |
||
29 | * @validate NotEmpty |
||
30 | * @todo validation type |
||
31 | */ |
||
32 | protected $whiteList = []; |
||
33 | |||
34 | /** |
||
35 | * @todo desc |
||
36 | * |
||
37 | * List of interface names that do implement: |
||
38 | * |
||
39 | * @see \Romm\Formz\Middleware\Scope\ScopeInterface |
||
40 | * |
||
41 | * @var array |
||
42 | * @todo validation type |
||
43 | */ |
||
44 | protected $blackList = []; |
||
45 | |||
46 | /** |
||
47 | * @param array $whiteList |
||
48 | * @param array $blackList |
||
49 | */ |
||
50 | public function __construct(array $whiteList = [MainScope::class], array $blackList = []) |
||
55 | |||
56 | /** |
||
57 | * @param string $scope |
||
58 | * @return bool |
||
59 | */ |
||
60 | public function isWhiteListed($scope) |
||
64 | |||
65 | /** |
||
66 | * @param string $scope |
||
67 | * @return bool |
||
68 | */ |
||
69 | public function isBlackListed($scope) |
||
73 | } |
||
74 |