original_string: protected function loadContentFromCookie()
      {
          $cookieStr = $this->extractSignedContent($_COOKIE[$this->name]);
  
          if ($cookieStr === false) {
              return;
          }
  
          $values = explode(self::VALUE_SEPARATOR, $cookieStr);
          foreach ($values as $nameValue) {
              $equalPos = strpos($nameValue, '=');
              $varName = substr($nameValue, 0, $equalPos);
              $varValue = substr($nameValue, $equalPos + 1);
  
              // no numeric value are base64 encoded so we need to decode them
              if (!is_numeric($varValue)) {
                  $tmpValue = base64_decode($varValue);
                  $varValue = safe_unserialize($tmpValue);
  
                  // discard entire cookie
                  // note: this assumes we never serialize a boolean
                  if ($varValue === false && $tmpValue !== 'b:0;') {
                      $this->value = array();
                      unset($_COOKIE[$this->name]);
                      break;
                  }
              }
  
              $this->value[$varName] = $varValue;
          }
      }
code: protected function loadContentFromCookie()
      {
          $cookieStr = $this->extractSignedContent($_COOKIE[$this->name]);
  
          if ($cookieStr === false) {
              return;
          }
  
          $values = explode(self::VALUE_SEPARATOR, $cookieStr);
          foreach ($values as $nameValue) {
              $equalPos = strpos($nameValue, '=');
              $varName = substr($nameValue, 0, $equalPos);
              $varValue = substr($nameValue, $equalPos + 1);
  
              // no numeric value are base64 encoded so we need to decode them
              if (!is_numeric($varValue)) {
                  $tmpValue = base64_decode($varValue);
                  $varValue = safe_unserialize($tmpValue);
  
                  // discard entire cookie
                  // note: this assumes we never serialize a boolean
                  if ($varValue === false && $tmpValue !== 'b:0;') {
                      $this->value = array();
                      unset($_COOKIE[$this->name]);
                      break;
                  }
              }
  
              $this->value[$varName] = $varValue;
          }
      }
code_tokens: protected function loadContentFromCookie ( ) { $ cookieStr = $ this -> extractSignedContent ( $ _COOKIE [ $ this -> name ] ) ; if ( $ cookieStr === false ) { return ; } $ values = explode ( self :: VALUE_SEPARATOR , $ cookieStr ) ; foreach ( $ values as $ nameValue ) { $ equalPos = strpos ( $ nameValue , '=' ) ; $ varName = substr ( $ nameValue , 0 , $ equalPos ) ; $ varValue = substr ( $ nameValue , $ equalPos + 1 ) ; // no numeric value are base64 encoded so we need to decode them if ( ! is_numeric ( $ varValue ) ) { $ tmpValue = base64_decode ( $ varValue ) ; $ varValue = safe_unserialize ( $ tmpValue ) ; // discard entire cookie // note: this assumes we never serialize a boolean if ( $ varValue === false && $ tmpValue !== 'b:0;' ) { $ this -> value = array ( ) ; unset ( $ _COOKIE [ $ this -> name ] ) ; break ; } } $ this -> value [ $ varName ] = $ varValue ; } }
docstring: Load the cookie content into a php array.
  Parses the cookie string to extract the different variables.
  Unserialize the array when necessary.
  Decode the non numeric values that were base64 encoded.
docstring_tokens: Load the cookie content into a php array . Parses the cookie string to extract the different variables . Unserialize the array when necessary . Decode the non numeric values that were base64 encoded .