/** private
  * set global vars used in Checks.class.php and BasicFunctions.class.php
  * to fasten the validation process.
  * return nothing.
  */
 private function prepare_global_vars()
 {
     global $header_array, $base_href;
     // find all header tags which are used in BasicFunctions.class.php
     $header_array = $this->content_dom->find("h1, h2, h3, h4, h5, h6, h7");
     // find base href, used to check image size
     $all_base_elements = $this->content_dom->find("base");
     if (is_array($all_base_elements)) {
         foreach ($all_base_elements as $base) {
             if (isset($base->attr['href'])) {
                 $base_href = $base->attr['href'];
                 break;
             }
         }
     }
     // set all check functions
     $checksDAO = new ChecksDAO();
     $rows = $checksDAO->getAllOpenChecks();
     if (is_array($rows)) {
         foreach ($rows as $row) {
             $this->check_func_array[$row['check_id']] = CheckFuncUtility::convertCode($row['func']);
         }
     }
 }