src/Step/SavePages.php
public function process()
    {
        call_user_func_array($this->phpoole->getMessageCb(), ['SAVE', 'Saving pages']);

        /* @var $page Page */
        $filteredPages = $this->phpoole->getPages()->filter(function (Page $page) {
            return !empty($page->getVariable('rendered'));
        });
        $max = count($filteredPages);

        $count = 0;
        foreach ($filteredPages as $page) {
            $count++;

            $pathname = $this->cleanPath($this->config->getOutputPath().'/'.$this->getPathname($page));

            Util::getFS()->dumpFile($pathname, $page->getVariable('rendered'));

            $message = substr($pathname, strlen($this->config->getDestinationDir()) + 1);
            call_user_func_array($this->phpoole->getMessageCb(), ['SAVE_PROGRESS', $message, $count, $max]);
        }
    }
public function process()
    {
        call_user_func_array($this->phpoole->getMessageCb(), ['SAVE', 'Saving pages']);

        /* @var $page Page */
        $filteredPages = $this->phpoole->getPages()->filter(function (Page $page) {
            return !empty($page->getVariable('rendered'));
        });
        $max = count($filteredPages);

        $count = 0;
        foreach ($filteredPages as $page) {
            $count++;

            $pathname = $this->cleanPath($this->config->getOutputPath().'/'.$this->getPathname($page));

            Util::getFS()->dumpFile($pathname, $page->getVariable('rendered'));

            $message = substr($pathname, strlen($this->config->getDestinationDir()) + 1);
            call_user_func_array($this->phpoole->getMessageCb(), ['SAVE_PROGRESS', $message, $count, $max]);
        }
    }
{@inheritdoc}

@throws Exception