resourceConnection = $resourceConnection; } /** * @inheritDoc */ public function execute(string $name, bool $forceReload = false): int { if (! isset($this->ids[$name]) || $forceReload) { $connection = $this->resourceConnection->getConnection(); $select = $connection ->select() ->from($this->resourceConnection->getTableName(Cookie::MAIN_TABLE_NAME), 'entity_id') ->where('name = :name'); $bind = [':name' => $name]; $this->ids[$name] = (int) $connection->fetchOne($select, $bind); } return $this->ids[$name]; } }