original_string: protected function loadSession(array &$session = null)
      {
          if (null === $session) {
              $session = &$_SESSION;
          }
  
          $bags = array_merge($this->bags, [$this->metadataBag]);
  
          foreach ($bags as $bag) {
              $key = $bag->getStorageKey();
              $session[$key] = isset($session[$key]) ? $session[$key] : [];
              $bag->initialize($session[$key]);
          }
  
          $this->started = true;
          $this->closed = false;
      }
code: protected function loadSession(array &$session = null)
      {
          if (null === $session) {
              $session = &$_SESSION;
          }
  
          $bags = array_merge($this->bags, [$this->metadataBag]);
  
          foreach ($bags as $bag) {
              $key = $bag->getStorageKey();
              $session[$key] = isset($session[$key]) ? $session[$key] : [];
              $bag->initialize($session[$key]);
          }
  
          $this->started = true;
          $this->closed = false;
      }
code_tokens: protected function loadSession ( array & $ session = null ) { if ( null === $ session ) { $ session = & $ _SESSION ; } $ bags = array_merge ( $ this -> bags , [ $ this -> metadataBag ] ) ; foreach ( $ bags as $ bag ) { $ key = $ bag -> getStorageKey ( ) ; $ session [ $ key ] = isset ( $ session [ $ key ] ) ? $ session [ $ key ] : [ ] ; $ bag -> initialize ( $ session [ $ key ] ) ; } $ this -> started = true ; $ this -> closed = false ; }
docstring: Load the session with attributes.
  
  After starting the session, PHP retrieves the session from whatever handlers
  are set to (either PHP's internal, or a custom save handler set with session_set_save_handler()).
  PHP takes the return value from the read() handler, unserializes it
  and populates $_SESSION with the result automatically.
docstring_tokens: Load the session with attributes .