summaryrefslogtreecommitdiff
path: root/framework/IStatePersister.php
diff options
context:
space:
mode:
Diffstat (limited to 'framework/IStatePersister.php')
-rw-r--r--framework/IStatePersister.php34
1 files changed, 34 insertions, 0 deletions
diff --git a/framework/IStatePersister.php b/framework/IStatePersister.php
new file mode 100644
index 00000000..c8ab5f25
--- /dev/null
+++ b/framework/IStatePersister.php
@@ -0,0 +1,34 @@
+<?php
+/**
+ * Core interfaces essential for TApplication class.
+ *
+ * @author Qiang Xue <qiang.xue@gmail.com>
+ * @link http://www.pradosoft.com/
+ * @copyright Copyright &copy; 2005-2014 PradoSoft
+ * @license http://www.pradosoft.com/license/
+ * @package System
+ */
+
+/**
+ * IStatePersister class.
+ *
+ * This interface must be implemented by all state persister classes (such as
+ * {@link TPageStatePersister}, {@link TApplicationStatePersister}.
+ *
+ * @author Qiang Xue <qiang.xue@gmail.com>
+ * @package System
+ * @since 3.0
+ */
+interface IStatePersister
+{
+ /**
+ * Loads state from a persistent storage.
+ * @return mixed the state
+ */
+ public function load();
+ /**
+ * Saves state into a persistent storage.
+ * @param mixed the state to be saved
+ */
+ public function save($state);
+} \ No newline at end of file