original_string: protected function _getPrimary($id, $type = null)
      {
          $this->_setupPrimaryKey();
  
          if ($type === null) {
              $type = self::PRIMARY_TYPE_NUM;
          }
  
          $primaryArray = array();
  
          foreach ($this->_primary as $index => $primary) {
              switch ($this->_primaryAssignment[$index]) {
                  case self::PRIMARY_ASSIGNMENT_SESSION_SAVE_PATH:
                      $value = $this->_sessionSavePath;
                      break;
                  case self::PRIMARY_ASSIGNMENT_SESSION_NAME:
                      $value = $this->_sessionName;
                      break;
                  case self::PRIMARY_ASSIGNMENT_SESSION_ID:
                      $value = (string) $id;
                      break;
                  default:
                      $value = (string) $this->_primaryAssignment[$index];
                      break;
              }
  
              switch ((string) $type) {
                  case self::PRIMARY_TYPE_PRIMARYNUM:
                      $primaryArray[$index] = $value;
                      break;
                  case self::PRIMARY_TYPE_ASSOC:
                      $primaryArray[$primary] = $value;
                      break;
                  case self::PRIMARY_TYPE_WHERECLAUSE:
                      $primaryArray[] = $this->getAdapter()->quoteIdentifier($primary, true) . ' = '
                                      . $this->getAdapter()->quote($value);
                      break;
                  case self::PRIMARY_TYPE_NUM:
                  default:
                      $primaryArray[] = $value;
                      break;
              }
          }
  
          return $primaryArray;
      }
code: protected function _getPrimary($id, $type = null)
      {
          $this->_setupPrimaryKey();
  
          if ($type === null) {
              $type = self::PRIMARY_TYPE_NUM;
          }
  
          $primaryArray = array();
  
          foreach ($this->_primary as $index => $primary) {
              switch ($this->_primaryAssignment[$index]) {
                  case self::PRIMARY_ASSIGNMENT_SESSION_SAVE_PATH:
                      $value = $this->_sessionSavePath;
                      break;
                  case self::PRIMARY_ASSIGNMENT_SESSION_NAME:
                      $value = $this->_sessionName;
                      break;
                  case self::PRIMARY_ASSIGNMENT_SESSION_ID:
                      $value = (string) $id;
                      break;
                  default:
                      $value = (string) $this->_primaryAssignment[$index];
                      break;
              }
  
              switch ((string) $type) {
                  case self::PRIMARY_TYPE_PRIMARYNUM:
                      $primaryArray[$index] = $value;
                      break;
                  case self::PRIMARY_TYPE_ASSOC:
                      $primaryArray[$primary] = $value;
                      break;
                  case self::PRIMARY_TYPE_WHERECLAUSE:
                      $primaryArray[] = $this->getAdapter()->quoteIdentifier($primary, true) . ' = '
                                      . $this->getAdapter()->quote($value);
                      break;
                  case self::PRIMARY_TYPE_NUM:
                  default:
                      $primaryArray[] = $value;
                      break;
              }
          }
  
          return $primaryArray;
      }
code_tokens: protected function _getPrimary ( $ id , $ type = null ) { $ this -> _setupPrimaryKey ( ) ; if ( $ type === null ) { $ type = self :: PRIMARY_TYPE_NUM ; } $ primaryArray = array ( ) ; foreach ( $ this -> _primary as $ index => $ primary ) { switch ( $ this -> _primaryAssignment [ $ index ] ) { case self :: PRIMARY_ASSIGNMENT_SESSION_SAVE_PATH : $ value = $ this -> _sessionSavePath ; break ; case self :: PRIMARY_ASSIGNMENT_SESSION_NAME : $ value = $ this -> _sessionName ; break ; case self :: PRIMARY_ASSIGNMENT_SESSION_ID : $ value = ( string ) $ id ; break ; default : $ value = ( string ) $ this -> _primaryAssignment [ $ index ] ; break ; } switch ( ( string ) $ type ) { case self :: PRIMARY_TYPE_PRIMARYNUM : $ primaryArray [ $ index ] = $ value ; break ; case self :: PRIMARY_TYPE_ASSOC : $ primaryArray [ $ primary ] = $ value ; break ; case self :: PRIMARY_TYPE_WHERECLAUSE : $ primaryArray [ ] = $ this -> getAdapter ( ) -> quoteIdentifier ( $ primary , true ) . ' = ' . $ this -> getAdapter ( ) -> quote ( $ value ) ; break ; case self :: PRIMARY_TYPE_NUM : default : $ primaryArray [ ] = $ value ; break ; } } return $ primaryArray ; }
docstring: Retrieve session table primary key values
  
  @param string $id
  @param string $type (optional; default: self::PRIMARY_TYPE_NUM)
  @return array
docstring_tokens: Retrieve session table primary key values