2018-02-17 17:18:58 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace router\controller;
|
|
|
|
|
|
|
|
|
|
|
|
class page{
|
|
|
|
|
|
|
|
|
|
|
|
private $pagename;
|
|
|
|
|
|
|
|
/* PRE-CALL
|
|
|
|
*
|
|
|
|
* @url<String> Calling URI
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
public function __construct($url){
|
|
|
|
$this->pagename = $url['page'];
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* CALL
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
public function load(){
|
2018-02-19 23:52:07 +00:00
|
|
|
if( file_exists(__PUBLIC__."/page/".$this->pagename.".php") )
|
|
|
|
include __PUBLIC__."/page/".$this->pagename.".php";
|
2018-02-17 17:18:58 +00:00
|
|
|
else
|
|
|
|
echo "page not found";
|
|
|
|
}
|
|
|
|
|
|
|
|
/* POST-CALL
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
public function __destruct(){
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|