/** * Load the data into this object from the DB (return false if no data found) */ protected function load() { // Get the objects row from the database if (!($row = LigminchaGlobalDistributed::getObject($this->id))) { return false; } // TODO: Also check if it's a matching type of type already set foreach ($row as $field => $val) { $prop = "{$field}"; $this->{$prop} = $val; } // Mark this object as existing in the database $this->exists = true; return true; }