Gumdrop\Commands\Reload::execute PHP Метод

execute() защищенный Метод

protected execute ( Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output )
$input Symfony\Component\Console\Input\InputInterface
$output Symfony\Component\Console\Output\OutputInterface
    protected function execute(InputInterface $input, OutputInterface $output)
    {
        $source = $input->getArgument('source');
        if (empty($source)) {
            $Application = new \Gumdrop\Application();
            $Application->setEngine(new \Gumdrop\Engine($Application));
            $Application->getEngine()->setSourceFallback();
            $source = $Application->getSourceLocation();
        }
        $destination = $input->getArgument('destination');
        $this->renderSite($source, $destination, $output);
        $last_checksum = $this->sourceChecksum($source);
        while (true) {
            $checksum = $this->sourceChecksum($source);
            if ($last_checksum != $checksum) {
                $this->renderSite($source, $destination, $output);
                $last_checksum = $checksum;
            }
            sleep(2);
        }
    }