$this->attributes = array();
}
- $this->attributes['time_created'] = '';
+ $this->attributes['time_created'] = NULL;
}
/**
protected function initializeAttributes() {
parent::initializeAttributes();
- $this->attributes['guid'] = "";
- $this->attributes['type'] = "";
- $this->attributes['subtype'] = "";
+ $this->attributes['guid'] = NULL;
+ $this->attributes['type'] = NULL;
+ $this->attributes['subtype'] = NULL;
$this->attributes['owner_guid'] = get_loggedin_userid();
$this->attributes['container_guid'] = get_loggedin_userid();
- $this->attributes['site_guid'] = 0;
+ $this->attributes['site_guid'] = NULL;
$this->attributes['access_id'] = ACCESS_PRIVATE;
- $this->attributes['time_updated'] = "";
- $this->attributes['last_action'] = '';
+ $this->attributes['time_updated'] = NULL;
+ $this->attributes['last_action'] = NULL;
$this->attributes['enabled'] = "yes";
// There now follows a bit of a hack
protected function initializeAttributes() {
parent::initializeAttributes();
- $this->attributes['type'] = '';
+ $this->attributes['type'] = NULL;
}
/**
parent::initializeAttributes();
$this->attributes['type'] = "group";
- $this->attributes['name'] = "";
- $this->attributes['description'] = "";
+ $this->attributes['name'] = NULL;
+ $this->attributes['description'] = NULL;
$this->attributes['tables_split'] = 2;
}
parent::initializeAttributes();
$this->attributes['type'] = "object";
- $this->attributes['title'] = "";
- $this->attributes['description'] = "";
+ $this->attributes['title'] = NULL;
+ $this->attributes['description'] = NULL;
$this->attributes['tables_split'] = 2;
}
parent::initializeAttributes();
$this->attributes['type'] = "site";
- $this->attributes['name'] = "";
- $this->attributes['description'] = "";
- $this->attributes['url'] = "";
+ $this->attributes['name'] = NULL;
+ $this->attributes['description'] = NULL;
+ $this->attributes['url'] = NULL;
$this->attributes['tables_split'] = 2;
}
parent::initializeAttributes();
$this->attributes['type'] = "user";
- $this->attributes['name'] = "";
- $this->attributes['username'] = "";
- $this->attributes['password'] = "";
- $this->attributes['salt'] = "";
- $this->attributes['email'] = "";
- $this->attributes['language'] = "";
- $this->attributes['code'] = "";
+ $this->attributes['name'] = NULL;
+ $this->attributes['username'] = NULL;
+ $this->attributes['password'] = NULL;
+ $this->attributes['salt'] = NULL;
+ $this->attributes['email'] = NULL;
+ $this->attributes['language'] = NULL;
+ $this->attributes['code'] = NULL;
$this->attributes['banned'] = "no";
$this->attributes['admin'] = 'no';
$this->attributes['tables_split'] = 2;
*/
public function testElggEntityAttributes() {
$test_attributes = array();
- $test_attributes['guid'] = '';
- $test_attributes['type'] = '';
- $test_attributes['subtype'] = '';
+ $test_attributes['guid'] = NULL;
+ $test_attributes['type'] = NULL;
+ $test_attributes['subtype'] = NULL;
$test_attributes['owner_guid'] = get_loggedin_userid();
$test_attributes['container_guid'] = get_loggedin_userid();
- $test_attributes['site_guid'] = 0;
+ $test_attributes['site_guid'] = NULL;
$test_attributes['access_id'] = ACCESS_PRIVATE;
- $test_attributes['time_created'] = '';
- $test_attributes['time_updated'] = '';
- $test_attributes['last_action'] = '';
+ $test_attributes['time_created'] = NULL;
+ $test_attributes['time_updated'] = NULL;
+ $test_attributes['last_action'] = NULL;
$test_attributes['enabled'] = 'yes';
$test_attributes['tables_split'] = 1;
$test_attributes['tables_loaded'] = 0;
public function testElggObjectConstructor() {
$attributes = array();
- $attributes['guid'] = '';
+ $attributes['guid'] = NULL;
$attributes['type'] = 'object';
- $attributes['subtype'] = '';
+ $attributes['subtype'] = NULL;
$attributes['owner_guid'] = get_loggedin_userid();
$attributes['container_guid'] = get_loggedin_userid();
- $attributes['site_guid'] = 0;
+ $attributes['site_guid'] = NULL;
$attributes['access_id'] = ACCESS_PRIVATE;
- $attributes['time_created'] = '';
- $attributes['time_updated'] = '';
- $attributes['last_action'] = '';
+ $attributes['time_created'] = NULL;
+ $attributes['time_updated'] = NULL;
+ $attributes['last_action'] = NULL;
$attributes['enabled'] = 'yes';
$attributes['tables_split'] = 2;
$attributes['tables_loaded'] = 0;
- $attributes['title'] = '';
- $attributes['description'] = '';
+ $attributes['title'] = NULL;
+ $attributes['description'] = NULL;
ksort($attributes);
$entity_attributes = $this->entity->expose_attributes();
*/
public function testElggSiteConstructor() {
$attributes = array();
- $attributes['guid'] = '';
+ $attributes['guid'] = NULL;
$attributes['type'] = 'site';
- $attributes['subtype'] = '';
+ $attributes['subtype'] = NULL;
$attributes['owner_guid'] = get_loggedin_userid();
$attributes['container_guid'] = get_loggedin_userid();
- $attributes['site_guid'] = 0;
+ $attributes['site_guid'] = NULL;
$attributes['access_id'] = ACCESS_PRIVATE;
- $attributes['time_created'] = '';
- $attributes['time_updated'] = '';
- $attributes['last_action'] = '';
+ $attributes['time_created'] = NULL;
+ $attributes['time_updated'] = NULL;
+ $attributes['last_action'] = NULL;
$attributes['enabled'] = 'yes';
$attributes['tables_split'] = 2;
$attributes['tables_loaded'] = 0;
- $attributes['name'] = '';
- $attributes['description'] = '';
- $attributes['url'] = '';
+ $attributes['name'] = NULL;
+ $attributes['description'] = NULL;
+ $attributes['url'] = NULL;
ksort($attributes);
$entity_attributes = $this->site->expose_attributes();
*/
public function testElggUserConstructor() {
$attributes = array();
- $attributes['guid'] = '';
+ $attributes['guid'] = NULL;
$attributes['type'] = 'user';
- $attributes['subtype'] = '';
+ $attributes['subtype'] = NULL;
$attributes['owner_guid'] = get_loggedin_userid();
$attributes['container_guid'] = get_loggedin_userid();
- $attributes['site_guid'] = 0;
+ $attributes['site_guid'] = NULL;
$attributes['access_id'] = ACCESS_PRIVATE;
- $attributes['time_created'] = '';
- $attributes['time_updated'] = '';
- $attributes['last_action'] = '';
+ $attributes['time_created'] = NULL;
+ $attributes['time_updated'] = NULL;
+ $attributes['last_action'] = NULL;
$attributes['enabled'] = 'yes';
$attributes['tables_split'] = 2;
$attributes['tables_loaded'] = 0;
- $attributes['name'] = '';
- $attributes['username'] = '';
- $attributes['password'] = '';
- $attributes['salt'] = '';
- $attributes['email'] = '';
- $attributes['language'] = '';
- $attributes['code'] = '';
+ $attributes['name'] = NULL;
+ $attributes['username'] = NULL;
+ $attributes['password'] = NULL;
+ $attributes['salt'] = NULL;
+ $attributes['email'] = NULL;
+ $attributes['language'] = NULL;
+ $attributes['code'] = NULL;
$attributes['banned'] = 'no';
$attributes['admin'] = 'no';
ksort($attributes);