query = $query; } public function getOneByCookie(string $cookie) { $query = $this->query->create(); $query->filterByCookie($cookie); return $query->findOne(); } }