Extension.php 996 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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\HttpKernel\DependencyInjection;
  11. use Symfony\Component\DependencyInjection\Extension\Extension as BaseExtension;
  12. /**
  13. * Allow adding classes to the class cache.
  14. *
  15. * @author Fabien Potencier <fabien@symfony.com>
  16. */
  17. abstract class Extension extends BaseExtension
  18. {
  19. private $classes = array();
  20. /**
  21. * Gets the classes to cache.
  22. *
  23. * @return array An array of classes
  24. */
  25. public function getClassesToCompile()
  26. {
  27. return $this->classes;
  28. }
  29. /**
  30. * Adds classes to the class cache.
  31. *
  32. * @param array $classes An array of classes
  33. */
  34. public function addClassesToCompile(array $classes)
  35. {
  36. $this->classes = array_merge($this->classes, $classes);
  37. }
  38. }