1 | <?php |
||
10 | class BaseStructure implements Structure |
||
11 | { |
||
12 | /** @var array */ |
||
13 | protected $data = []; |
||
14 | |||
15 | /** |
||
16 | * Register new active row class for table |
||
17 | * @param string $tableName |
||
18 | * @param string $activeRowClass |
||
19 | * @return Structure|BaseStructure |
||
20 | */ |
||
21 | 72 | public function registerActiveRowClass(string $tableName, string $activeRowClass): Structure |
|
26 | |||
27 | /** |
||
28 | * Register new selection class for table |
||
29 | * @param string $tableName |
||
30 | * @param string $selectionClass |
||
31 | * @return Structure|BaseStructure |
||
32 | */ |
||
33 | 72 | public function registerSelectionClass(string $tableName, string $selectionClass): Structure |
|
38 | |||
39 | /** |
||
40 | * Register new scopes for table |
||
41 | * @param string $tableName |
||
42 | * @param array $scopes |
||
43 | * @return Structure|BaseStructure |
||
44 | * @throws SimpleMapperException |
||
45 | */ |
||
46 | 70 | public function registerScopes(string $tableName, array $scopes): Structure |
|
57 | |||
58 | /** |
||
59 | * Fetch row class by table |
||
60 | * @param string $tableName |
||
61 | * @return string |
||
62 | */ |
||
63 | 54 | public function getActiveRowClass(string $tableName): string |
|
67 | |||
68 | /** |
||
69 | * Fetch selection class by table |
||
70 | * @param string $tableName |
||
71 | * @return string |
||
72 | */ |
||
73 | 64 | public function getSelectionClass(string $tableName): string |
|
77 | |||
78 | /** |
||
79 | * Returns all scopes registered for table |
||
80 | * @param string $tableName |
||
81 | * @return array |
||
82 | */ |
||
83 | 2 | public function getScopes(string $tableName): array |
|
87 | |||
88 | /** |
||
89 | * Returns one scope |
||
90 | * @param string $tableName |
||
91 | * @param string $scope |
||
92 | * @return Scope|null |
||
93 | */ |
||
94 | 6 | public function getScope(string $tableName, string $scope): ?Scope |
|
98 | } |
||
99 |