/**
  * __construct 
  * 
  * @param mixed $securityManager The security manager
  *
  * @access public
  * @return void
  */
 public function __construct($securityManager = null)
 {
     $this->_context = new DefaultSubjectContext();
     if ($securityManager === null) {
         $this->_securityManager = SecurityUtils::getSecurityManager();
     }
 }
 /**
  * getSession 
  * 
  * @param mixed $create The params to create.
  *
  * @access public
  * @return void
  */
 public function getSession($create = true)
 {
     global $logger;
     if ($this->_session == null && $create == true) {
         $this->_session = SecurityUtils::getSecurityManager()->startSession();
     }
     return $this->_session;
 }
 public function resolveSecurityManager()
 {
     global $logger;
     $securityManager = $this->getSecurityManager();
     if ($securityManager == null) {
         $logger->debug("No SecurityManager available in subject context map.  " + "Falling back to SecurityUtils.getSecurityManager() lookup.");
         try {
             $securityManager = SecurityUtils::getSecurityManager();
         } catch (\Exception $e) {
             $logger->debug("No SecurityManager available via SecurityUtils.  Heuristics exhausted.");
         }
     }
     return $securityManager;
 }