Constructs a DatabaseStorageController object.
string $entityType: The entity type for which the instance is created.
public function __construct($entityType) {
$this->entityType = $entityType;
$this->entityInfo = entity_get_info($entityType);
$this->entityCache = array();
$this->hookLoadArguments = array();
$this->idKey = $this->entityInfo['entity_keys']['id'];
// Check if the entity type supports UUIDs.
if (!empty($this->entityInfo['entity_keys']['uuid'])) {
$this->uuidKey = $this->entityInfo['entity_keys']['uuid'];
}
else {
$this->uuidKey = FALSE;
}
// Check if the entity type supports revisions.
if (!empty($this->entityInfo['entity_keys']['revision'])) {
$this->revisionKey = $this->entityInfo['entity_keys']['revision'];
$this->revisionTable = $this->entityInfo['revision_table'];
}
else {
$this->revisionKey = FALSE;
}
// Check if the entity type supports static caching of loaded entities.
$this->cache = !empty($this->entityInfo['static_cache']);
}