ResourceInterface.php 1.0 KB

123456789101112131415161718192021222324252627282930313233
  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\Resource;
  11. /**
  12. * ResourceInterface is the interface that must be implemented by all Resource classes.
  13. *
  14. * @author Fabien Potencier <fabien@symfony.com>
  15. */
  16. interface ResourceInterface
  17. {
  18. /**
  19. * Returns a string representation of the Resource.
  20. *
  21. * This method is necessary to allow for resource de-duplication, for example by means
  22. * of array_unique(). The string returned need not have a particular meaning, but has
  23. * to be identical for different ResourceInterface instances referring to the same
  24. * resource; and it should be unlikely to collide with that of other, unrelated
  25. * resource instances.
  26. *
  27. * @return string A string representation unique to the underlying Resource
  28. */
  29. public function __toString();
  30. }