<?php use ephFrame\core\Router, ephFrame\core\Route; $router = Router::getInstance(); $router->addRoutes(array(new Route('/:page', array('action' => 'display', 'controller' => 'app\\controller\\Controller')), 'root' => new Route('/', array('action' => 'index', 'controller' => 'app\\controller\\Controller'))));
color: #4C4C4C; padding: 1em; background-color: #E6E6E6; } a, a:visited { color: #0080FF; } h1 { text-shadow: 0px 1px 1px rgba(0,0,0,0.25), 0px -1px 1px rgba(255,255,255,0.25); color: #000; font-weight: bold; font-size: 3em; } </style> </head> <body> <div id="app"> <div id="header"> <h1><a href="<?php echo \ephFrame\core\Router::getInstance()->root; ?> "></a></h1> </div> <div id="content"> <?php echo $content; ?> </div> </div> </body> </html>
public function testGetInstance() { $this->assertInstanceOf('\\ephFrame\\core\\Router', Router::getInstance()); }