// Is $guid is an ElggGroup? Use a copy constructor
else if ($guid instanceof ElggGroup) {
elgg_deprecated_notice('This type of usage of the ElggGroup constructor was deprecated. Please use the clone method.', 1.7);
-
+
foreach ($guid->attributes as $key => $value) {
$this->attributes[$key] = $value;
}
// We assume if we have got this far, $guid is an int
else if (is_numeric($guid)) {
if (!$this->load($guid)) {
- IOException(sprintf(elgg_echo('IOException:FailedToLoadGUID'), get_class(), $guid));
+ throw new IOException(sprintf(elgg_echo('IOException:FailedToLoadGUID'), get_class(), $guid));
}
}
*/
function get_group_members($group_guid, $limit = 10, $offset = 0, $site_guid = 0, $count = false) {
return elgg_get_entities_from_relationship(array(
- 'relationship' => 'member',
- 'relationship_guid' => $group_guid,
- 'inverse_relationship' => TRUE,
- 'types' => 'user',
- 'limit' => $limit,
- 'offset' => $offset,
- 'count' => $count,
+ 'relationship' => 'member',
+ 'relationship_guid' => $group_guid,
+ 'inverse_relationship' => TRUE,
+ 'types' => 'user',
+ 'limit' => $limit,
+ 'offset' => $offset,
+ 'count' => $count,
'site_guid' => $site_guid
));
}
// Is $guid is an ElggObject? Use a copy constructor
else if ($guid instanceof ElggObject) {
elgg_deprecated_notice('This type of usage of the ElggObject constructor was deprecated. Please use the clone method.', 1.7);
-
+
foreach ($guid->attributes as $key => $value) {
$this->attributes[$key] = $value;
}
// We assume if we have got this far, $guid is an int
else if (is_numeric($guid)) {
if (!$this->load($guid)) {
- IOException(sprintf(elgg_echo('IOException:FailedToLoadGUID'), get_class(), $guid));
+ throw new IOException(sprintf(elgg_echo('IOException:FailedToLoadGUID'), get_class(), $guid));
}
}
$offset = (int)$offset;
return elgg_get_entities_from_relationship(array(
- 'relationship' => 'member_of_site',
- 'relationship_guid' => $object_guid,
+ 'relationship' => 'member_of_site',
+ 'relationship_guid' => $object_guid,
'types' => 'site',
'limit' => $limit,
'offset' => $offset
// We assume if we have got this far, $guid is an int
else if (is_numeric($guid)) {
if (!$this->load($guid)) {
- IOException(sprintf(elgg_echo('IOException:FailedToLoadGUID'), get_class(), $guid));
+ throw new IOException(sprintf(elgg_echo('IOException:FailedToLoadGUID'), get_class(), $guid));
}
}