summaryrefslogtreecommitdiff
path: root/framework/TApplication.php
diff options
context:
space:
mode:
authorxue <>2006-02-11 21:30:59 +0000
committerxue <>2006-02-11 21:30:59 +0000
commitc56b1bdb0065b752930f74eabe20f985722268ac (patch)
treed223bf62103c8c4a222e5b643e7177cfe490281a /framework/TApplication.php
parent7670361a4fb7d660352ba998da821c51da18c448 (diff)
Added TSecurityManager and state encryption method.
Diffstat (limited to 'framework/TApplication.php')
-rw-r--r--framework/TApplication.php31
1 files changed, 29 insertions, 2 deletions
diff --git a/framework/TApplication.php b/framework/TApplication.php
index 1a982488..2f25925d 100644
--- a/framework/TApplication.php
+++ b/framework/TApplication.php
@@ -31,6 +31,10 @@ require_once(PRADO_DIR.'/Web/THttpSession.php');
*/
require_once(PRADO_DIR.'/Security/TAuthorizationRule.php');
/**
+ * Includes TSecurityManager class
+ */
+require_once(PRADO_DIR.'/Security/TSecurityManager.php');
+/**
* Includes TPageService class (default service)
*/
require_once(PRADO_DIR.'/Web/Services/TPageService.php');
@@ -240,12 +244,14 @@ class TApplication extends TComponent
* @var IUser user instance, could be null
*/
private $_user=null;
-
/**
* @var TGlobalization module, could be null
*/
private $_globalization=null;
-
+ /**
+ * @var TSecurityManager security manager module
+ */
+ private $_security=null;
/**
* @var TAuthorizationRuleCollection collection of authorization rules
*/
@@ -651,6 +657,27 @@ class TApplication extends TComponent
}
/**
+ * @return TSecurityManager the security manager module
+ */
+ public function getSecurityManager()
+ {
+ if(!$this->_security)
+ {
+ $this->_security=new TSecurityManager;
+ $this->_security->init(null);
+ }
+ return $this->_security;
+ }
+
+ /**
+ * @param TSecurityManager the security manager module
+ */
+ public function setSecurityManager(TSecurityManager $sm)
+ {
+ $this->_security=$sm;
+ }
+
+ /**
* @return IStatePersister application state persister
*/
public function getApplicationStatePersister()