function DelAtom($concept, $atomId)
{
    Logger::getLogger('EXECENGINE')->info("DelAtom({$concept},{$atomId})");
    if (func_num_args() != 2) {
        throw new Exception("Wrong number of arguments supplied for function DelAtom(): " . func_num_args() . " arguments", 500);
    }
    try {
        $atom = new Atom($atomId, Concept::getConceptByLabel($concept));
        $atom->deleteAtom();
        // delete atom + all relations with other atoms
        Logger::getLogger('EXECENGINE')->debug("Atom '{$atom}' deleted");
    } catch (Exception $e) {
        Logger::getUserLogger()->error('DelAtom: ' . $e->getMessage());
    }
}
Esempio n. 2
0
 /**
  * Delete provided Ampersand session atom from database
  * @param string $sessionAtomId ampersand session atom id
  * @return void
  */
 private function destroyAmpersandSession($sessionAtomId)
 {
     $this->database->Exe("DELETE FROM `__SessionTimeout__` WHERE SESSION = '{$sessionAtomId}'");
     $atom = new Atom($sessionAtomId, Concept::getConceptByLabel('SESSION'));
     $atom->deleteAtom();
     $this->database->commitTransaction();
 }