function create_route_file($arr, $table_name, $table_name_to_class) { $file = fopen("data/application/route_file.php", "a"); $file_data = get_route_data($arr, $table_name, $table_name_to_class); // get_route_data function are in include page fwrite($file, $file_data); fclose($file); }
/** * Get the data associated with the route, and prepare output. * * @param $route * @return string */ function execute_route($route) { // retrieve data about the route by executing the page-data // ['page_title'] // ['page_content'] $page_data = get_route_data($route); // include the page wrapper template and pass along our // route-determined page_data $output = template('page-wrapper', $page_data); // return the completed route output to the caller return $output; }