original_string: public function setFromADOKey($adokey) {
  
          // Calculate the XMLDB_KEY
          switch (strtolower($adokey['name'])) {
              case 'primary':
                  $this->type = XMLDB_KEY_PRIMARY;
                  break;
              default:
                  $this->type = XMLDB_KEY_UNIQUE;
          }
          // Set the fields, converting all them to lowercase
          $fields = array_flip(array_change_key_case(array_flip($adokey['columns'])));
          $this->fields = $fields;
          // Some more fields
          $this->loaded = true;
          $this->changed = true;
      }
code: public function setFromADOKey($adokey) {
  
          // Calculate the XMLDB_KEY
          switch (strtolower($adokey['name'])) {
              case 'primary':
                  $this->type = XMLDB_KEY_PRIMARY;
                  break;
              default:
                  $this->type = XMLDB_KEY_UNIQUE;
          }
          // Set the fields, converting all them to lowercase
          $fields = array_flip(array_change_key_case(array_flip($adokey['columns'])));
          $this->fields = $fields;
          // Some more fields
          $this->loaded = true;
          $this->changed = true;
      }
code_tokens: public function setFromADOKey ( $ adokey ) { // Calculate the XMLDB_KEY switch ( strtolower ( $ adokey [ 'name' ] ) ) { case 'primary' : $ this -> type = XMLDB_KEY_PRIMARY ; break ; default : $ this -> type = XMLDB_KEY_UNIQUE ; } // Set the fields, converting all them to lowercase $ fields = array_flip ( array_change_key_case ( array_flip ( $ adokey [ 'columns' ] ) ) ) ; $ this -> fields = $ fields ; // Some more fields $ this -> loaded = true ; $ this -> changed = true ; }
docstring: This function will set all the attributes of the xmldb_key object
  based on information passed in one ADOkey
  @oaram array $adokey
docstring_tokens: This function will set all the attributes of the xmldb_key object based on information passed in one ADOkey