protected function getOrCreate(string $id, callable $creator)
    {
        if (!$this->getHelperSet()->has('container')) {
            return $creator();
        }

        $container = $this->getContainer();
        if ($container->has($id)) {
            return $container->get($id);
        }

        return $creator();
    }