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