ptut-vhost/build/router/controller/page.php

41 lines
491 B
PHP
Raw Normal View History

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(){
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(){
}
}