protected function checkRequirements(OutputInterface $output)
    {
        $output->write('Checking requirements...');
        $errors = false;

        // Check PHP version:
        if (!(version_compare(PHP_VERSION, '5.3.8') >= 0)) {
            $output->writeln('');
            $output->writeln('<error>'.Lang::get('phpci_php_req').'</error>');
            $errors = true;
        }

        // Check required extensions are present:
        $requiredExtensions = array('PDO', 'pdo_mysql');

        foreach ($requiredExtensions as $extension) {
            if (!extension_loaded($extension)) {
                $output->writeln('');
                $output->writeln('<error>'.Lang::get('extension_required', $extension).'</error>');
                $errors = true;
            }
        }

        // Check required functions are callable:
        $requiredFunctions = array('exec', 'shell_exec');

        foreach ($requiredFunctions as $function) {
            if (!function_exists($function)) {
                $output->writeln('');
                $output->writeln('<error>'.Lang::get('function_required', $function).'</error>');
                $errors = true;
            }
        }

        if (!function_exists('password_hash')) {
            $output->writeln('');
            $output->writeln('<error>'.Lang::get('function_required', $function).'</error>');
            $errors = true;
        }

        if ($errors) {
            throw new Exception(Lang::get('requirements_not_met'));
        }

        $output->writeln(' <info>'.Lang::get('ok').'</info>');
        $output->writeln('');
    }