| Conditions | 3 |
| Paths | 4 |
| Total Lines | 17 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 30 | public function getCurrentFileStorageDataLayer(): FileStorageDataLayer |
||
| 31 | { |
||
| 32 | $apieContext = $this->apieContext->getActiveContext(); |
||
| 33 | $apie = $apieContext->getApie(); |
||
| 34 | |||
| 35 | $context = implode('.', $apieContext->getContextKey()); |
||
| 36 | // make sure we keep the root Apie instance in a separate folder. |
||
| 37 | if (!$context) { |
||
| 38 | $context = '-'; |
||
| 39 | } |
||
| 40 | if (!isset($this->instantiated[$context])) { |
||
| 41 | $this->instantiated[$context] = new FileStorageDataLayer( |
||
| 42 | $this->storagePath . DIRECTORY_SEPARATOR . $context, |
||
| 43 | $apie->getPropertyAccessor() |
||
| 44 | ); |
||
| 45 | } |
||
| 46 | return $this->instantiated[$context]; |
||
| 47 | } |
||
| 49 |