You are here

public function Entity::internalIdentifier in Entity API 7

Returns the internal, numeric identifier.

Returns the numeric identifier, even if the entity type has specified a name key. In the latter case, the numeric identifier is supposed to be used when dealing generically with entities or internally to refer to an entity, i.e. in a relational database. If unsure, use Entity:identifier().

Overrides EntityInterface::internalIdentifier

File

includes/entity.inc, line 227
Provides a base class for entities.

Class

Entity
A common class for entities.

Code

public function internalIdentifier() {
  return isset($this->{$this->idKey}) ? $this->{$this->idKey} : NULL;
}