src/Step/LocateContent.php
public function process()
    {
        call_user_func_array($this->phpoole->getMessageCb(), ['LOCATE', 'Loading content']);

        try {
            $content = Finder::create()
                ->files()
                ->in($this->phpoole->getConfig()->getContentPath())
                ->name('/\.('.implode('|', $this->phpoole->getConfig()->get('content.ext')).')$/');
            if (!$content instanceof Finder) {
                throw new Exception(__FUNCTION__.': result must be an instance of Symfony\Component\Finder.');
            }
            $count = $content->count();
            call_user_func_array($this->phpoole->getMessageCb(), ['LOCATE_PROGRESS', 'Start locating', 0, $count]);
            $this->phpoole->setContent($content);
            call_user_func_array($this->phpoole->getMessageCb(), ['LOCATE_PROGRESS', 'Files loaded', $count, $count]);
        } catch (Exception $e) {
            echo $e->getMessage()."\n";
        }
    }
public function process()
    {
        call_user_func_array($this->phpoole->getMessageCb(), ['LOCATE', 'Loading content']);

        try {
            $content = Finder::create()
                ->files()
                ->in($this->phpoole->getConfig()->getContentPath())
                ->name('/\.('.implode('|', $this->phpoole->getConfig()->get('content.ext')).')$/');
            if (!$content instanceof Finder) {
                throw new Exception(__FUNCTION__.': result must be an instance of Symfony\Component\Finder.');
            }
            $count = $content->count();
            call_user_func_array($this->phpoole->getMessageCb(), ['LOCATE_PROGRESS', 'Start locating', 0, $count]);
            $this->phpoole->setContent($content);
            call_user_func_array($this->phpoole->getMessageCb(), ['LOCATE_PROGRESS', 'Files loaded', $count, $count]);
        } catch (Exception $e) {
            echo $e->getMessage()."\n";
        }
    }
{@inheritdoc}