protected function execute(InputInterface $input, OutputInterface $output) { if (!$this->isInstalled()) { throw new RuntimeException('Invalid Kirby installation'); } // bootstrap the core $this->bootstrap(); $output->writeln("<info>Core:\t\t" . kirby::version() . "</info>"); $output->writeln("<info>Toolkit:\t" . toolkit::version() . "</info>"); // also check for the panel version, if it is installed if (is_dir($this->dir() . '/panel')) { if (!is_file($this->dir() . '/panel/app/bootstrap.php')) { throw new RuntimeException('The panel does not seem to be correctly installed'); } // bootstrap the panel require $this->dir() . '/panel/app/bootstrap.php'; $output->writeln("<info>Panel:\t\t" . panel::version() . "</info>"); } }
} ?> </div> <nav class="slider-nav"> <a class="slider-prev" href="#"><span>‹</span></a> <a class="slider-next" href="#"><span>›</span></a> </nav> </div> <section class="intro"> <h1 class="alpha with-beta">Kirby is a file‑based CMS</h1> <p class="beta">Easy to setup. Easy to use. Flexible as hell.</p> <a class="btn-white" href="<?php echo url('try'); ?> ">Download <?php echo kirby::version(); ?> </a> </section> </div> </header> <div class="site"> <?php } else { ?> <div class="site"> <header class="site-header" role="banner">
public function requirements() { if (!version_compare(PHP_VERSION, static::$requires['php'], '>=')) { throw new Exception('Your PHP version is too old. Please upgrade to ' . static::$requires['php'] . ' or newer.'); } if (!detect::mbstring()) { throw new Exception('The mbstring extension must be installed'); } if (!version_compare(toolkit::version(), static::$requires['toolkit'], '>=')) { throw new Exception('Your Toolkit version is too old. Please upgrade to ' . static::$requires['toolkit'] . ' or newer.'); } if (!version_compare(kirby::version(), static::$requires['kirby'], '>=')) { throw new Exception('Your Kirby version is too old. Please upgrade to ' . static::$requires['kirby'] . ' or newer.'); } }
/** * Get or set the user agent send with each request. * * @param string $name User agent to send. * @return string|self */ public function agent($name = null) { if (is_null($name)) { $kirby = 'Kirby/' . kirby::version(); $plugin = isset($this->agent) ? $this->agent : 'Kirby Comments/' . plugin('comments')->version(); return $kirby . ' | ' . $plugin; } $this->agent = $name; return $this; }