/**
  * This method deletes an engine from a user's keyring
  */
 private function disable()
 {
     if (empty($this->id)) {
         $this->result['errors'][] = array('code' => -5, 'message' => "Engine id required");
         return;
     }
     $engineToBeDeleted = EnginesModel_EngineStruct::getStruct();
     $engineToBeDeleted->id = $this->id;
     $engineToBeDeleted->uid = $this->uid;
     $engineDAO = new EnginesModel_EngineDAO(Database::obtain());
     $result = $engineDAO->disable($engineToBeDeleted);
     if (!$result instanceof EnginesModel_EngineStruct) {
         $this->result['errors'][] = array('code' => -9, 'message' => "Deletion failed. Generic error");
         return;
     }
     $this->result['data']['id'] = $result->id;
 }