2017-11-23 10:23:09 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace router\controller;
|
|
|
|
|
|
|
|
|
|
|
|
class page{
|
|
|
|
|
|
|
|
|
|
|
|
private $pagename;
|
|
|
|
|
|
|
|
/* PRE-CALL
|
|
|
|
*
|
|
|
|
* @url<String> Calling URI
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
public function __construct($url){
|
2017-11-29 11:29:27 +00:00
|
|
|
|
2017-11-30 15:45:26 +00:00
|
|
|
$this->pagename = $url['page'];
|
2017-11-23 10:23:09 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* CALL
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
public function load(){
|
2017-11-26 13:40:40 +00:00
|
|
|
if( file_exists(__ROOT__."/view/".$this->pagename.".php") )
|
|
|
|
include __ROOT__."/view/".$this->pagename.".php";
|
2017-11-23 10:23:09 +00:00
|
|
|
else
|
|
|
|
echo "page not found";
|
|
|
|
}
|
|
|
|
|
|
|
|
/* POST-CALL
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
public function __destruct(){
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|