コード例 #1
0
 public function get_file($params = [])
 {
     $link_style = isset($params['link_style']) ? $params['link_style'] : 0;
     $reference = Reference::read_file($params['file_name'], $link_style);
     SiteStructure::set_page_title($reference['title']);
     Render::html($reference['content'], [], 'text/html');
 }
コード例 #2
0
ファイル: solution.php プロジェクト: wileybenet/mobile-docs
 public static function read_by_params_and_render($params)
 {
     $solution = self::read_by_name($params['solution_name']);
     SiteStructure::set_page_title($solution['title']);
     $template = new Template($solution['content'], TRUE);
     $solution['content'] = $template->scrape($solution)->render();
     return $solution;
 }
コード例 #3
0
ファイル: reference.php プロジェクト: wileybenet/mobile-docs
 public static function read_by_page($params)
 {
     //echo '<pre>'; debug_print_backtrace(); print_r($params); echo '</pre>'; exit;
     $file_name = isset($params['page']) ? $params['page'] : 'doc-basic';
     $link_style = isset($params['link_style']) ? $params['link_style'] : 2;
     $reference = self::read_file($file_name, $link_style);
     SiteStructure::set_page_title($reference['title']);
     return $reference;
 }
コード例 #4
0
ファイル: post.php プロジェクト: wileybenet/mobile-docs
 public static function read_by_params_and_render($params)
 {
     if (isset($params['post_name'])) {
         $post = self::read_by_name($params['post_name']);
     } else {
         $post = self::read_by_date($params['year'], $params['month'], $params['day']);
     }
     SiteStructure::set_page_title($post['title']);
     $template = new Template($post['content'], TRUE);
     $post['content'] = $template->scrape($post)->render();
     return $post;
 }
コード例 #5
0
ファイル: admin_ctrl.php プロジェクト: wileybenet/mobile-docs
 public function routes($params = [])
 {
     Session::permit_admin();
     SiteStructure::set_page_title('Routes');
     Render::php(ADMIN . 'routes.php');
 }