original_string: public function deleteKey($keyname) {
  
          $key = $this->getKey($keyname);
          if ($key) {
              $i = $this->findKeyInArray($keyname);
              // Look for prev and next key
              $prevkey = $this->getKey($key->getPrevious());
              $nextkey = $this->getKey($key->getNext());
              // Change their previous and next attributes
              if ($prevkey) {
                  $prevkey->setNext($key->getNext());
              }
              if ($nextkey) {
                  $nextkey->setPrevious($key->getPrevious());
              }
              // Delete the key
              unset($this->keys[$i]);
              // Reorder the Keys
              $this->orderKeys($this->keys);
              // Recalculate the hash
              $this->calculateHash(true);
              // We have one deleted key, so the table has changed
              $this->setChanged(true);
          }
      }
code: public function deleteKey($keyname) {
  
          $key = $this->getKey($keyname);
          if ($key) {
              $i = $this->findKeyInArray($keyname);
              // Look for prev and next key
              $prevkey = $this->getKey($key->getPrevious());
              $nextkey = $this->getKey($key->getNext());
              // Change their previous and next attributes
              if ($prevkey) {
                  $prevkey->setNext($key->getNext());
              }
              if ($nextkey) {
                  $nextkey->setPrevious($key->getPrevious());
              }
              // Delete the key
              unset($this->keys[$i]);
              // Reorder the Keys
              $this->orderKeys($this->keys);
              // Recalculate the hash
              $this->calculateHash(true);
              // We have one deleted key, so the table has changed
              $this->setChanged(true);
          }
      }
code_tokens: public function deleteKey ( $ keyname ) { $ key = $ this -> getKey ( $ keyname ) ; if ( $ key ) { $ i = $ this -> findKeyInArray ( $ keyname ) ; // Look for prev and next key $ prevkey = $ this -> getKey ( $ key -> getPrevious ( ) ) ; $ nextkey = $ this -> getKey ( $ key -> getNext ( ) ) ; // Change their previous and next attributes if ( $ prevkey ) { $ prevkey -> setNext ( $ key -> getNext ( ) ) ; } if ( $ nextkey ) { $ nextkey -> setPrevious ( $ key -> getPrevious ( ) ) ; } // Delete the key unset ( $ this -> keys [ $ i ] ) ; // Reorder the Keys $ this -> orderKeys ( $ this -> keys ) ; // Recalculate the hash $ this -> calculateHash ( true ) ; // We have one deleted key, so the table has changed $ this -> setChanged ( true ) ; } }
docstring: Delete one key from the table
  @param string $keyname
docstring_tokens: Delete one key from the table