N98\Magento\Command\System\Check\Filesystem\FoldersCheck::check PHP Метод

check() публичный Метод

public check ( N98\Magento\Command\System\Check\ResultCollection $results )
$results N98\Magento\Command\System\Check\ResultCollection
    public function check(ResultCollection $results)
    {
        $folders = $this->_commandConfig['filesystem']['folders'];
        $magentoRoot = $this->_checkCommand->getApplication()->getMagentoRootFolder();
        foreach ($folders as $folder => $comment) {
            $result = $results->createResult();
            if (file_exists($magentoRoot . DIRECTORY_SEPARATOR . $folder)) {
                $result->setStatus(Result::STATUS_OK);
                $result->setMessage("<info>Folder <comment>" . $folder . "</comment> found.</info>");
                if (!is_writeable($magentoRoot . DIRECTORY_SEPARATOR . $folder)) {
                    $result->setStatus(Result::STATUS_ERROR);
                    $result->setMessage("<error>Folder " . $folder . " is not writeable!</error><comment> Usage: " . $comment . "</comment>");
                }
            } else {
                $result->setStatus(Result::STATUS_ERROR);
                $result->setMessage("<error>Folder " . $folder . " not found!</error><comment> Usage: " . $comment . "</comment>");
            }
        }
    }