[lux commit] r126 - trunk/Lux/View/Helper

0 views
Skip to first unread message

codesite...@google.com

unread,
Mar 18, 2008, 2:55:14 PM3/18/08
to lux...@googlegroups.com
Author: rodrigo.moraes
Date: Tue Mar 18 05:06:09 2008
New Revision: 126

Added:
trunk/Lux/View/Helper/Json.php (contents, props changed)

Log:
[NEW] Simple helper to return a Solar_Json object.

Added: trunk/Lux/View/Helper/Json.php
==============================================================================
--- (empty file)
+++ trunk/Lux/View/Helper/Json.php Tue Mar 18 05:06:09 2008
@@ -0,0 +1,53 @@
+<?php
+/**
+ *
+ * Returns a Solar_Json object for views.
+ *
+ * @category Lux
+ *
+ * @package Lux_View_Helper
+ *
+ * @author Rodrigo Moraes <rodrigo...@gmail.com>
+ *
+ * @license http://opensource.org/licenses/bsd-license.php BSD
+ *
+ * @version $Id$
+ *
+ */
+class Lux_View_Helper_Json extends Solar_View_Helper
+{
+ /**
+ *
+ * A JSON object, shared by jQuery helpers.
+ *
+ * @param Solar_Json
+ *
+ */
+ protected $_json;
+
+ /**
+ *
+ * Constructor.
+ *
+ * @param array $config User-provided configuration values.
+ *
+ */
+ public function __construct($config = null)
+ {
+ parent::__construct($config);
+
+ $this->_json = Solar::factory('Solar_Json');
+ }
+
+ /**
+ *
+ * Returns a Solar_Json object for views.
+ *
+ * @return Solar_Json
+ *
+ */
+ public function json()
+ {
+ return $this->_json;
+ }
+}
\ No newline at end of file

Reply all
Reply to author
Forward
0 new messages