PageRenderTime 46ms CodeModel.GetById 21ms RepoModel.GetById 1ms app.codeStats 0ms

/src/application/libraries/Zend/View/Interface.php

https://bitbucket.org/masnug/grc276-blog-laravel
PHP | 137 lines | 15 code | 12 blank | 110 comment | 0 complexity | b8dd95211eda450f05a14f874a562a3a MD5 | raw file
  1. <?php
  2. /**
  3. * Zend Framework
  4. *
  5. * LICENSE
  6. *
  7. * This source file is subject to the new BSD license that is bundled
  8. * with this package in the file LICENSE.txt.
  9. * It is also available through the world-wide-web at this URL:
  10. * http://framework.zend.com/license/new-bsd
  11. * If you did not receive a copy of the license and are unable to
  12. * obtain it through the world-wide-web, please send an email
  13. * to license@zend.com so we can send you a copy immediately.
  14. *
  15. * @category Zend
  16. * @package Zend_View
  17. * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
  18. * @license http://framework.zend.com/license/new-bsd New BSD License
  19. * @version $Id: Interface.php 23775 2011-03-01 17:25:24Z ralph $
  20. */
  21. /**
  22. * Interface class for Zend_View compatible template engine implementations
  23. *
  24. * @category Zend
  25. * @package Zend_View
  26. * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
  27. * @license http://framework.zend.com/license/new-bsd New BSD License
  28. */
  29. interface Zend_View_Interface
  30. {
  31. /**
  32. * Return the template engine object, if any
  33. *
  34. * If using a third-party template engine, such as Smarty, patTemplate,
  35. * phplib, etc, return the template engine object. Useful for calling
  36. * methods on these objects, such as for setting filters, modifiers, etc.
  37. *
  38. * @return mixed
  39. */
  40. public function getEngine();
  41. /**
  42. * Set the path to find the view script used by render()
  43. *
  44. * @param string|array The directory (-ies) to set as the path. Note that
  45. * the concrete view implentation may not necessarily support multiple
  46. * directories.
  47. * @return void
  48. */
  49. public function setScriptPath($path);
  50. /**
  51. * Retrieve all view script paths
  52. *
  53. * @return array
  54. */
  55. public function getScriptPaths();
  56. /**
  57. * Set a base path to all view resources
  58. *
  59. * @param string $path
  60. * @param string $classPrefix
  61. * @return void
  62. */
  63. public function setBasePath($path, $classPrefix = 'Zend_View');
  64. /**
  65. * Add an additional path to view resources
  66. *
  67. * @param string $path
  68. * @param string $classPrefix
  69. * @return void
  70. */
  71. public function addBasePath($path, $classPrefix = 'Zend_View');
  72. /**
  73. * Assign a variable to the view
  74. *
  75. * @param string $key The variable name.
  76. * @param mixed $val The variable value.
  77. * @return void
  78. */
  79. public function __set($key, $val);
  80. /**
  81. * Allows testing with empty() and isset() to work
  82. *
  83. * @param string $key
  84. * @return boolean
  85. */
  86. public function __isset($key);
  87. /**
  88. * Allows unset() on object properties to work
  89. *
  90. * @param string $key
  91. * @return void
  92. */
  93. public function __unset($key);
  94. /**
  95. * Assign variables to the view script via differing strategies.
  96. *
  97. * Suggested implementation is to allow setting a specific key to the
  98. * specified value, OR passing an array of key => value pairs to set en
  99. * masse.
  100. *
  101. * @see __set()
  102. * @param string|array $spec The assignment strategy to use (key or array of key
  103. * => value pairs)
  104. * @param mixed $value (Optional) If assigning a named variable, use this
  105. * as the value.
  106. * @return void
  107. */
  108. public function assign($spec, $value = null);
  109. /**
  110. * Clear all assigned variables
  111. *
  112. * Clears all variables assigned to Zend_View either via {@link assign()} or
  113. * property overloading ({@link __get()}/{@link __set()}).
  114. *
  115. * @return void
  116. */
  117. public function clearVars();
  118. /**
  119. * Processes a view script and returns the output.
  120. *
  121. * @param string $name The script name to process.
  122. * @return string The script output.
  123. */
  124. public function render($name);
  125. }