Example #1
0
 /**
  *
  */
 public static function getInstance()
 {
     if (self::$instance == NULL) {
         self::$instance = new refnotes_reference_database();
         /* Loading has to be separated from construction to prevent infinite recursion */
         self::$instance->load();
     }
     return self::$instance;
 }
Example #2
0
 /**
  *
  */
 private function loadDatabaseDefinition()
 {
     $name = $this->namespaceName . $this->name;
     $note = refnotes_reference_database::getInstance()->findNote($name);
     if ($note != NULL) {
         $this->attributes = $note->getAttributes();
         $this->data = $note->getData();
     }
 }