phpbb\console\command\update\check::check_core PHP Метод

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

Check if the core is up to date
protected check_core ( Symfony\Component\Console\Input\InputInterface $input, SymfonyStyle $io, string $stability, boolean $recheck ) : integer
$input Symfony\Component\Console\Input\InputInterface Input stream, used to get the options.
$io Symfony\Component\Console\Style\SymfonyStyle IO handler, for formatted and unified IO
$stability string Force a given stability
$recheck boolean Disallow the use of the cache
Результат integer
    protected function check_core(InputInterface $input, SymfonyStyle $io, $stability, $recheck)
    {
        $version_helper = $this->phpbb_container->get('version_helper');
        $version_helper->force_stability($stability);
        $updates_available = $version_helper->get_suggested_updates($recheck);
        if ($input->getOption('verbose')) {
            $io->title('phpBB core');
            $io->note($this->language->lang('CURRENT_VERSION') . $this->language->lang('COLON') . ' ' . $this->config['version']);
        }
        if (!empty($updates_available)) {
            $io->caution($this->language->lang('UPDATE_NEEDED'));
            if ($input->getOption('verbose')) {
                $this->display_versions($io, $updates_available);
            }
            return 1;
        } else {
            if ($input->getOption('verbose')) {
                $io->success($this->language->lang('UPDATE_NOT_NEEDED'));
            }
            return 0;
        }
    }