예제 #1
0
파일: RegistryTest.php 프로젝트: hawkao/mew
 public function testController()
 {
     $c = Registry::controller('page');
     $this->assertInstanceOf('\\ukatama\\Mew\\Controller\\PageController', $c);
 }
예제 #2
0
파일: index.php 프로젝트: hawkao/mew
<?php

require_once __DIR__ . '/vendor/autoload.php';
use ukatama\Mew\Config;
use ukatama\Mew\Input;
use ukatama\Mew\PageController;
use ukatama\Mew\Registry;
ini_set('display_errors', Config::get('debug'));
try {
    Registry::controller(Input::get('c', 'page'))->dispatch(Input::get('a', 'view'));
} catch (Exception $e) {
    $ctr = Registry::controller('error');
    $ctr->error = $e;
    $ctr->dispatch('error');
}