/**
  * Gets the page data from the DB.
  *
  * If the page does not exist, an exception is thrown.
  */
 public function get_page($page_name)
 {
     $raw_page_sections = self::get_raw_page_sections($page_name);
     $first = TRUE;
     foreach ($raw_page_sections as $rps) {
         if ($first) {
             $first = FALSE;
             $page = new DBPages_Page($rps['name']);
         }
         $section = new DBPages_Section($rps['text'], $rps['filter_function'], $rps['modified']);
         $page->add_section($rps['section'], $section);
         #$at_start_of_section = FALSE;
     }
     #print_r($page); exit;
     return $page;
 }
 /**
  * Gets the page data from the DB.
  *
  * If the page does not exist, an exception is thrown.
  */
 public function get_page($page_name)
 {
     if (DEBUG) {
         echo DEBUG_DELIM_OPEN;
         echo 'File: ' . __FILE__ . PHP_EOL;
         echo 'Line: ' . __LINE__ . PHP_EOL;
         echo 'Method: ' . __METHOD__ . PHP_EOL;
         echo DEBUG_DELIM_CLOSE;
     }
     $raw_page_sections = self::get_raw_page_sections($page_name);
     $first = TRUE;
     foreach ($raw_page_sections as $rps) {
         if ($first) {
             $first = FALSE;
             $page = new DBPages_Page($rps['name']);
         }
         $section = new DBPages_Section($rps['text'], $rps['filter_function'], $rps['modified']);
         $page->add_section($rps['section'], $section);
         #$at_start_of_section = FALSE;
     }
     #print_r($page); exit;
     return $page;
 }