From c56b1bdb0065b752930f74eabe20f985722268ac Mon Sep 17 00:00:00 2001 From: xue <> Date: Sat, 11 Feb 2006 21:30:59 +0000 Subject: Added TSecurityManager and state encryption method. --- framework/TApplication.php | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) (limited to 'framework/TApplication.php') diff --git a/framework/TApplication.php b/framework/TApplication.php index 1a982488..2f25925d 100644 --- a/framework/TApplication.php +++ b/framework/TApplication.php @@ -30,6 +30,10 @@ require_once(PRADO_DIR.'/Web/THttpSession.php'); * Includes TAuthorizationRule class */ require_once(PRADO_DIR.'/Security/TAuthorizationRule.php'); +/** + * Includes TSecurityManager class + */ +require_once(PRADO_DIR.'/Security/TSecurityManager.php'); /** * Includes TPageService class (default service) */ @@ -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 */ @@ -650,6 +656,27 @@ class TApplication extends TComponent $this->_errorHandler=$handler; } + /** + * @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 */ -- cgit v1.2.3