00001 <?php
00002
00015
00016
00017 import('help.HelpMappingFile');
00018
00019 class OCSHelpMappingFile extends HelpMappingFile {
00023 function OCSHelpMappingFile() {
00024 parent::HelpMappingFile('help/help.xml');
00025 }
00026
00030 function getTocFilename($tocId) {
00031 $help =& Help::getHelp();
00032 return sprintf('help/%s/%s.xml', $help->getLocale(), $tocId);
00033 }
00034
00038 function getTopicFilename($topicId) {
00039 $help =& Help::getHelp();
00040 return sprintf('help/%s/%s.xml', $help->getLocale(), $topicId);
00041 }
00042
00043
00044 function getTopicIdForFilename($filename) {
00045 $parts = split('/', str_replace('\\', '/', $filename));
00046 array_shift($parts);
00047 array_shift($parts);
00048 return substr(join('/', $parts), 0, -4);
00049 }
00050
00051 function getSearchPath($locale = null) {
00052 if ($locale == '') {
00053 $help =& Help::getHelp();
00054 $locale = $help->getLocale();
00055 }
00056 return 'help' . DIRECTORY_SEPARATOR . $locale;
00057 }
00058 }
00059
00060 ?>