FileLocatorStub.php 381 B

1234567891011121314151617
  1. <?php
  2. namespace Symfony\Component\Routing\Tests\Loader;
  3. use Symfony\Component\Config\FileLocatorInterface;
  4. class FileLocatorStub implements FileLocatorInterface
  5. {
  6. public function locate($name, $currentPath = null, $first = true)
  7. {
  8. if (0 === strpos($name, 'http')) {
  9. return $name;
  10. }
  11. return rtrim($currentPath, '/').'/'.$name;
  12. }
  13. }