1: <?php
2: /**
3: * @category Horde
4: * @package View
5: */
6:
7: /**
8: * Concrete class for handling views.
9: *
10: * @category Horde
11: * @package View
12: */
13: class Horde_View_Json extends Horde_View_Base
14: {
15: /**
16: * Processes a template and returns the output.
17: *
18: * @param string $name The template to process.
19: *
20: * @return string The template output.
21: */
22: public function render($name = '', $locals = array())
23: {
24: return json_encode((object)(array)$this);
25: }
26:
27: /**
28: * Satisfy the abstract _run function in Horde_View_Base.
29: */
30: protected function _run()
31: {
32: }
33: }
34: