protected function singlePageLinkProcess($matches)
 {
     if (detectAbsolutePath($matches[4])) {
         return $matches[0];
     }
     if ($matches[1] == 'a' && substr($matches[4], 0, 1) == '#') {
         return $matches[0];
     }
     return '<' . $matches[1] . $matches[2] . $matches[3] . '="images/' . $this->textConvPageDir . $matches[4] . '"' . $matches[5] . '>';
 }
 public function getBookTheme()
 {
     $workshopThemeDir = colesoApplication::getConfigVal('/bulldoc/themeDir');
     $workshopThemeUrl = colesoApplication::getConfigVal('/bulldoc/themeUrl');
     if (isset($this->bookData['theme'])) {
         $theme = $this->bookData['theme'];
         if (is_array($theme)) {
             if (!detectAbsolutePath($theme['themePath'])) {
                 $theme['themePath'] = $workshopThemeDir . $theme['themePath'];
             }
             if (!detectAbsolutePath($theme['themeUrl'])) {
                 $theme['themeUrl'] = $workshopThemeUrl . $theme['themeUrl'];
             }
         } else {
             $theme = array('themePath' => $workshopThemeDir . $theme, 'themeUrl' => $workshopThemeUrl . $theme);
         }
         return $theme;
     } else {
         $defaultTheme = colesoApplication::getConfigVal('/bulldoc/defaultTheme');
         return array('themePath' => $workshopThemeDir . $defaultTheme, 'themeUrl' => $workshopThemeUrl . $defaultTheme);
     }
 }