public static function get_instance()
 {
     if (!isset(self::$instance)) {
         self::$instance = new DBPages_ContentManager();
     }
     return self::$instance;
 }
예제 #2
0
 /**
  * Returns the section of the page.
  *
  * Before the text of the section is returned,
  * it is passed through a processing function
  * that can be set for each text saved in this
  * module.
  *
  * For example, the processing function might
  * make HTML entities render nicely in browsers.
  */
 public static function get_filtered_page_section($page_name, $section_name)
 {
     $cm = DBPages_ContentManager::get_instance();
     $page = $cm->get_page($page_name);
     #print_r($page);exit;
     $section = $page->get_section($section_name);
     #print_r($section);
     #exit;
     $ft = $section->get_filtered_text();
     #echo "\$ft: $ft\n";
     #exit;
     return $ft;
 }
예제 #3
0
 /**
  * Returns the section of the page.
  *
  * Before the text of the section is returned,
  * it is passed through a processing function
  * that can be set for each text saved in this
  * module.
  *
  * For example, the processing function might
  * make HTML entities render nicely in browsers.
  */
 public static function get_filtered_page_section($page_name, $section_name)
 {
     if (DEBUG) {
         echo DEBUG_DELIM_OPEN;
         echo __FILE__ . PHP_EOL;
         echo 'Line: ' . __LINE__ . PHP_EOL;
         echo 'Method: ' . __METHOD__ . PHP_EOL;
         echo DEBUG_DELIM_CLOSE;
     }
     $cm = DBPages_ContentManager::get_instance();
     #echo "\$cm:\n"; print_r($cm); exit;
     $page = $cm->get_page($page_name);
     #print_r($page);exit;
     $section = $page->get_section($section_name);
     #print_r($section);
     #exit;
     $ft = $section->get_filtered_text();
     #echo "\$ft: $ft\n";
     #exit;
     return $ft;
 }