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