| 1 | <?php |
||
| 15 | class RelationsConfig extends InjectableConfig |
||
| 16 | { |
||
| 17 | /** |
||
| 18 | * Configuration section. |
||
| 19 | */ |
||
| 20 | const CONFIG = 'schemas/relations'; |
||
| 21 | |||
| 22 | /** |
||
| 23 | * Relation sub classes. |
||
| 24 | */ |
||
| 25 | const SCHEMA_CLASS = 'schema'; |
||
| 26 | const LOADER_CLASS = 'loader'; |
||
| 27 | const ACCESS_CLASS = 'access'; |
||
| 28 | |||
| 29 | /** |
||
| 30 | * @var array |
||
| 31 | */ |
||
| 32 | protected $config = []; |
||
| 33 | |||
| 34 | /** |
||
| 35 | * @param string $type |
||
| 36 | * @param string $section |
||
| 37 | * |
||
| 38 | * @return bool |
||
| 39 | */ |
||
| 40 | public function hasRelation(string $type, string $section = self::SCHEMA_CLASS): bool |
||
| 44 | |||
| 45 | /** |
||
| 46 | * @param string $type |
||
| 47 | * @param string $section |
||
| 48 | * |
||
| 49 | * @return string |
||
| 50 | */ |
||
| 51 | public function relationClass(string $type, string $section): string |
||
| 55 | } |