| @@ 163-172 (lines=10) @@ | ||
| 160 | /** |
|
| 161 | * {@inheritdoc} |
|
| 162 | */ |
|
| 163 | protected function getReferencesInDirectory($path, $stopOnFirst = false) |
|
| 164 | { |
|
| 165 | $basePath = rtrim($path, '/'); |
|
| 166 | ||
| 167 | return $this->getReferencesForRegex( |
|
| 168 | $basePath.'/', |
|
| 169 | '~^'.preg_quote($basePath, '~').'/[^/]+$~', |
|
| 170 | $stopOnFirst |
|
| 171 | ); |
|
| 172 | } |
|
| 173 | ||
| 174 | /** |
|
| 175 | * {@inheritdoc} |
|
| @@ 289-302 (lines=14) @@ | ||
| 286 | /** |
|
| 287 | * {@inheritdoc} |
|
| 288 | */ |
|
| 289 | protected function getReferencesInDirectory($path, $stopOnFirst = false) |
|
| 290 | { |
|
| 291 | $basePath = rtrim($path, '/'); |
|
| 292 | ||
| 293 | return $this->getReferencesForRegex( |
|
| 294 | $basePath.'/', |
|
| 295 | '~^'.preg_quote($basePath, '~').'/[^/]+$~', |
|
| 296 | $stopOnFirst, |
|
| 297 | // Traverse directories and match their contents against the glob |
|
| 298 | true, |
|
| 299 | // Limit the directory exploration to the depth of the path + 1 |
|
| 300 | $this->getPathDepth($path) + 1 |
|
| 301 | ); |
|
| 302 | } |
|
| 303 | ||
| 304 | /** |
|
| 305 | * Flattens a two-level reference array into a one-level array. |
|