LoaderInterface.php 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. <?php
  2. /*
  3. * This file is part of the Symfony package.
  4. *
  5. * (c) Fabien Potencier <fabien@symfony.com>
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. namespace Symfony\Component\Config\Loader;
  11. /**
  12. * LoaderInterface is the interface implemented by all loader classes.
  13. *
  14. * @author Fabien Potencier <fabien@symfony.com>
  15. */
  16. interface LoaderInterface
  17. {
  18. /**
  19. * Loads a resource.
  20. *
  21. * @param mixed $resource The resource
  22. * @param string $type The resource type
  23. */
  24. public function load($resource, $type = null);
  25. /**
  26. * Returns true if this class supports the given resource.
  27. *
  28. * @param mixed $resource A resource
  29. * @param string $type The resource type
  30. *
  31. * @return Boolean true if this class supports the given resource, false otherwise
  32. */
  33. public function supports($resource, $type = null);
  34. /**
  35. * Gets the loader resolver.
  36. *
  37. * @return LoaderResolverInterface A LoaderResolverInterface instance
  38. */
  39. public function getResolver();
  40. /**
  41. * Sets the loader resolver.
  42. *
  43. * @param LoaderResolverInterface $resolver A LoaderResolverInterface instance
  44. */
  45. public function setResolver(LoaderResolverInterface $resolver);
  46. }