/** * Initialize the attributes array. * * This is vital to distinguish between metadata and base parameters. * * @return void */ protected function initializeAttributes() { parent::initializeAttributes(); $this->attributes['guid'] = NULL; $this->attributes['type'] = NULL; $this->attributes['subtype'] = NULL; $this->attributes['owner_guid'] = elgg_get_logged_in_user_guid(); $this->attributes['container_guid'] = elgg_get_logged_in_user_guid(); $this->attributes['site_guid'] = NULL; $this->attributes['access_id'] = ACCESS_PRIVATE; $this->attributes['time_created'] = NULL; $this->attributes['time_updated'] = NULL; $this->attributes['last_action'] = NULL; $this->attributes['enabled'] = "yes"; // There now follows a bit of a hack /* Problem: To speed things up, some objects are split over several tables, * this means that it requires n number of database reads to fully populate * an entity. This causes problems for caching and create events * since it is not possible to tell whether a subclassed entity is complete. * * Solution: We have two counters, one 'tables_split' which tells whatever is * interested how many tables are going to need to be searched in order to fully * populate this object, and 'tables_loaded' which is how many have been * loaded thus far. * * If the two are the same then this object is complete. * * Use: isFullyLoaded() to check */ $this->attributes['tables_split'] = 1; $this->attributes['tables_loaded'] = 0; }
/** * (non-PHPdoc) * * @see \ElggData::initializeAttributes() * * @return void */ protected function initializeAttributes() { parent::initializeAttributes(); $this->attributes['id'] = null; $this->attributes['guid_one'] = null; $this->attributes['relationship'] = null; $this->attributes['guid_two'] = null; }
/** * (non-PHPdoc) * * @see \ElggData::initializeAttributes() * * @return void */ protected function initializeAttributes() { parent::initializeAttributes(); $this->attributes['type'] = null; $this->attributes['id'] = null; $this->attributes['entity_guid'] = null; $this->attributes['owner_guid'] = null; $this->attributes['access_id'] = ACCESS_PRIVATE; $this->attributes['enabled'] = 'yes'; }
/** * Initialize the attributes array. * * This is vital to distinguish between metadata and base parameters. * * @return void */ protected function initializeAttributes() { parent::initializeAttributes(); $this->attributes['guid'] = null; $this->attributes['type'] = null; $this->attributes['subtype'] = null; $this->attributes['owner_guid'] = _elgg_services()->session->getLoggedInUserGuid(); $this->attributes['container_guid'] = _elgg_services()->session->getLoggedInUserGuid(); $this->attributes['access_id'] = ACCESS_PRIVATE; $this->attributes['time_updated'] = null; $this->attributes['last_action'] = null; $this->attributes['enabled'] = "yes"; }
/** * (non-PHPdoc) * * @see ElggData::initializeAttributes() * * @return void */ protected function initializeAttributes() { parent::initializeAttributes(); $this->attributes['type'] = NULL; }