src/Leevel/View/Console/Cache.php
protected function compiles(Finder $finder, string $path): void
    {
        if (0 === count($finder)) {
            $this->comment(
                sprintf('Compile files not found in path `%s` and skipped.', $path)
            );

            return;
        }

        $this->info(sprintf('Start to compiles path `%s`', $path));

        $progressBar = new ProgressBar(new ConsoleOutput(), count($finder));
        $progressBar->setFormat('[View:cache]%current%/%max% [%bar%] %percent:3s%% %elapsed:6s%/%estimated:-6s% %memory:6s%');

        foreach ($finder as $file) {
            $progressBar->advance();

            $this->parser->doCompile(
                $file->getRealPath(),
                $this->html->getCachePath($file->getRealPath())
            );
        }

        $progressBar->finish();
        $this->line('');
    }
protected function compiles(Finder $finder, string $path): void
    {
        if (0 === count($finder)) {
            $this->comment(
                sprintf('Compile files not found in path `%s` and skipped.', $path)
            );

            return;
        }

        $this->info(sprintf('Start to compiles path `%s`', $path));

        $progressBar = new ProgressBar(new ConsoleOutput(), count($finder));
        $progressBar->setFormat('[View:cache]%current%/%max% [%bar%] %percent:3s%% %elapsed:6s%/%estimated:-6s% %memory:6s%');

        foreach ($finder as $file) {
            $progressBar->advance();

            $this->parser->doCompile(
                $file->getRealPath(),
                $this->html->getCachePath($file->getRealPath())
            );
        }

        $progressBar->finish();
        $this->line('');
    }
编译视图文件.

@param \Symfony\Component\Finder\Finder $finder
@param string                           $path