/** * Implements KeyValueStore\Storage\StorageInterface::getAll(). */ public function getAll() { $result = db_query('SELECT name, value FROM {' . db_escape_table($this->table) . '} WHERE collection = :collection', array(':collection' => $this->collection)); $values = array(); foreach ($result as $item) { if ($item) { $values[$item->name] = unserialize($item->value); } } return $values; }
/** * Return the name of the model table. * * @return string * The prefixed and escaped name of the table. */ protected static function getTableName() { $ret = '{' . db_escape_table(static::TABLE) . '}'; return $ret; }