public function Entity::__sleep

cis7 entity.inc public Entity::__sleep()
cle7 entity.inc public Entity::__sleep()
elmsmedia7 entity.inc public Entity::__sleep()
icor7 entity.inc public Entity::__sleep()
meedjum_blog7 entity.inc public Entity::__sleep()
mooc7 entity.inc public Entity::__sleep()

Magic method to only serialize what's necessary.

File

sites/all/modules/ulmus/entity/includes/entity.inc, line 298
Provides a base class for entities.

Class

Entity
A common class for entities.

Code

public function __sleep() {
  $vars = get_object_vars($this);
  unset($vars['entityInfo'], $vars['idKey'], $vars['nameKey'], $vars['statusKey']);
  // Also key the returned array with the variable names so the method may
  // be easily overridden and customized.
  return drupal_map_assoc(array_keys($vars));
}
Error | ELMSLN API

Error

×

Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/api.elmsln.org/includes/common.inc:2791) in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/api.elmsln.org/includes/bootstrap.inc).
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/api.elmsln.org/sites/all/modules/apc/drupal_apc_cache.inc).
The website encountered an unexpected error. Please try again later.