Drupal investigation

Variable.php 798B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  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\DependencyInjection;
  11. /**
  12. * Represents a variable.
  13. *
  14. * $var = new Variable('a');
  15. *
  16. * will be dumped as
  17. *
  18. * $a
  19. *
  20. * by the PHP dumper.
  21. *
  22. * @author Johannes M. Schmitt <schmittjoh@gmail.com>
  23. */
  24. class Variable
  25. {
  26. private $name;
  27. /**
  28. * @param string $name
  29. */
  30. public function __construct($name)
  31. {
  32. $this->name = $name;
  33. }
  34. /**
  35. * Converts the object to a string.
  36. *
  37. * @return string
  38. */
  39. public function __toString()
  40. {
  41. return $this->name;
  42. }
  43. }