| @@ 119-132 (lines=14) @@ | ||
| 116 | if (!$scss) { |
|
| 117 | parent::append($root, $file, $webRoot, $throw); |
|
| 118 | } else { |
|
| 119 | if (!$webRoot) { |
|
| 120 | $webRoot = $this->findWebRoot($root); |
|
| 121 | ||
| 122 | if (!$webRoot) { |
|
| 123 | $webRoot = ''; |
|
| 124 | $this->logger->error('ResourceLocator can not find a web root (root: {root}, file: {file}, webRoot: {webRoot}, throw: {throw})', [ |
|
| 125 | 'app' => 'lib', |
|
| 126 | 'root' => $root, |
|
| 127 | 'file' => $file, |
|
| 128 | 'webRoot' => $webRoot, |
|
| 129 | 'throw' => $throw ? 'true' : 'false' |
|
| 130 | ]); |
|
| 131 | } |
|
| 132 | } |
|
| 133 | ||
| 134 | if ($throw && $tmpRoot === '/') { |
|
| 135 | throw new ResourceNotFoundException($file, $webRoot); |
|
| @@ 171-184 (lines=14) @@ | ||
| 168 | return; |
|
| 169 | } |
|
| 170 | ||
| 171 | if (!$webRoot) { |
|
| 172 | $webRoot = $this->findWebRoot($root); |
|
| 173 | ||
| 174 | if (!$webRoot) { |
|
| 175 | $webRoot = ''; |
|
| 176 | $this->logger->error('ResourceLocator can not find a web root (root: {root}, file: {file}, webRoot: {webRoot}, throw: {throw})', [ |
|
| 177 | 'app' => 'lib', |
|
| 178 | 'root' => $root, |
|
| 179 | 'file' => $file, |
|
| 180 | 'webRoot' => $webRoot, |
|
| 181 | 'throw' => $throw ? 'true' : 'false' |
|
| 182 | ]); |
|
| 183 | } |
|
| 184 | } |
|
| 185 | $this->resources[] = array($root, $webRoot, $file); |
|
| 186 | ||
| 187 | if ($throw && !is_file($root . '/' . $file)) { |
|