Helper.php 972 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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\Templating\Helper;
  11. /**
  12. * Helper is the base class for all helper classes.
  13. *
  14. * Most of the time, a Helper is an adapter around an existing
  15. * class that exposes a read-only interface for templates.
  16. *
  17. * @author Fabien Potencier <fabien@symfony.com>
  18. */
  19. abstract class Helper implements HelperInterface
  20. {
  21. protected $charset = 'UTF-8';
  22. /**
  23. * Sets the default charset.
  24. *
  25. * @param string $charset The charset
  26. */
  27. public function setCharset($charset)
  28. {
  29. $this->charset = $charset;
  30. }
  31. /**
  32. * Gets the default charset.
  33. *
  34. * @return string The default charset
  35. */
  36. public function getCharset()
  37. {
  38. return $this->charset;
  39. }
  40. }