DynamicContentAwareInterface.php 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <?php
  2. /**
  3. * @link http://www.yiiframework.com/
  4. * @copyright Copyright (c) 2008 Yii Software LLC
  5. * @license http://www.yiiframework.com/license/
  6. */
  7. namespace yii\base;
  8. /**
  9. * DynamicContentAwareInterface is the interface that should be implemented by classes
  10. * which support a [[View]] dynamic content feature.
  11. *
  12. * @author Sergey Makinen <sergey@makinen.ru>
  13. * @since 2.0.14
  14. */
  15. interface DynamicContentAwareInterface
  16. {
  17. /**
  18. * Returns a list of placeholders for dynamic content. This method
  19. * is used internally to implement the content caching feature.
  20. * @return array a list of placeholders.
  21. */
  22. public function getDynamicPlaceholders();
  23. /**
  24. * Sets a list of placeholders for dynamic content. This method
  25. * is used internally to implement the content caching feature.
  26. * @param array $placeholders a list of placeholders.
  27. */
  28. public function setDynamicPlaceholders($placeholders);
  29. /**
  30. * Adds a placeholder for dynamic content.
  31. * This method is used internally to implement the content caching feature.
  32. * @param string $name the placeholder name.
  33. * @param string $statements the PHP statements for generating the dynamic content.
  34. */
  35. public function addDynamicPlaceholder($name, $statements);
  36. }