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

42 lines
492 B
PHP

<?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__."/view/".$this->pagename.".php") )
include __PUBLIC__."/view/".$this->pagename.".php";
else
echo "page not found";
}
/* POST-CALL
*
*/
public function __destruct(){
}
}