示例#1
0
 function __construct(Databases $databases, Route $route)
 {
     if (!$route->branchLevelId()) {
         throw new \RuntimeException('Try to access BranchDb with undefined branch context');
     }
     $this->db = $databases[$route->branchLevelId()];
 }
示例#2
0
 function __invoke(Route $route, Sessions $sessions)
 {
     $this->authResponse = $this->logout();
     $this->handleAuthResponse();
     if ($route->branchLevelId() == $sessions[0]->id) {
         unset($sessions[0]);
     }
 }
示例#3
0
 protected function getSession(Sessions $sessions, Route $route)
 {
     return $sessions[$route->branchLevelId()];
 }