Conditions | 4 |
Paths | 6 |
Total Lines | 16 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
26 | public function createAbsolutePath($relativePath, $destinationAlias = NULL) |
||
27 | { |
||
28 | if ($relativePath instanceof IStoreFile) { |
||
29 | $relativePath = $relativePath->getRelativePath(); |
||
30 | } |
||
31 | |||
32 | if ($destinationAlias === NULL) { |
||
33 | $path = $this->destinationDirs[$this->default]; |
||
34 | } elseif (isset($this->destinationDirs[$destinationAlias])) { |
||
35 | $path = $this->destinationDirs[$destinationAlias]; |
||
36 | } else { |
||
37 | throw new InvalidArgumentException('Destination alias does not exists "' . $destinationAlias . '".'); |
||
38 | } |
||
39 | |||
40 | return $path . DIRECTORY_SEPARATOR . $relativePath; |
||
41 | } |
||
42 | |||
44 |