diff options
author | xue <> | 2005-12-03 04:42:14 +0000 |
---|---|---|
committer | xue <> | 2005-12-03 04:42:14 +0000 |
commit | 0d42be79b9dfeaa7686fb7da11920af4eb0561d7 (patch) | |
tree | 2ddbfeb4243ed5d87985158ee905ea521c430fca /framework/Web/UI/THiddenFieldPageStatePersister.php | |
parent | c488100ee3bf9d6c27a0a78e3174a6c698fabfa2 (diff) |
Diffstat (limited to 'framework/Web/UI/THiddenFieldPageStatePersister.php')
-rw-r--r-- | framework/Web/UI/THiddenFieldPageStatePersister.php | 37 |
1 files changed, 29 insertions, 8 deletions
diff --git a/framework/Web/UI/THiddenFieldPageStatePersister.php b/framework/Web/UI/THiddenFieldPageStatePersister.php index 24ef5491..3d305668 100644 --- a/framework/Web/UI/THiddenFieldPageStatePersister.php +++ b/framework/Web/UI/THiddenFieldPageStatePersister.php @@ -1,14 +1,35 @@ <?php
-require_once(PRADO_DIR.'/Web/UI/TPageStatePersister.php');
-
-class THiddenFieldPageStatePersister extends TPageStatePersister
+class THiddenFieldPageStatePersister extends TComponent implements IPageStatePersister, IModule
{
- private $_page;
+ private $_application;
+ private $_id='persister';
+
+ /**
+ * Initializes the service.
+ * This method is required by IModule interface.
+ * @param TApplication application
+ * @param TXmlElement module configuration
+ */
+ public function init($application,$config)
+ {
+ $this->_application=$application;
+ }
+
+ /**
+ * @return string id of this module
+ */
+ public function getID()
+ {
+ return $this->_id;
+ }
- public function __construct($page)
+ /**
+ * @param string id of this module
+ */
+ public function setID($value)
{
- $this->_page=$page;
+ $this->_id=$value;
}
public function save($state)
@@ -19,12 +40,12 @@ class THiddenFieldPageStatePersister extends TPageStatePersister $data=gzcompress($hmac.$data);
else
$data=$hmac.$data;
- $this->_page->saveStateField($data);
+ $this->_application->getService()->getRequestedPage()->saveStateField($data);
}
public function load()
{
- $str=$this->_page->loadStateField();
+ $str=$this->_application->getService()->getRequestedPage()->loadStateField();
if($str==='')
return null;
if(function_exists('gzuncompress') && function_exists('gzcompress'))
|