PageRenderTime 54ms CodeModel.GetById 21ms RepoModel.GetById 0ms app.codeStats 0ms

/common/libraries/php/autoloader.class.php

https://bitbucket.org/chamilo/chamilo/
PHP | 969 lines | 515 code | 16 blank | 438 comment | 6 complexity | a981e1ffe616efef4e67c0699fbd614d MD5 | raw file
Possible License(s): GPL-2.0, BSD-3-Clause, LGPL-2.1, LGPL-3.0, GPL-3.0, MIT

Large files files are truncated, but you can click here to view the full file

  1. <?php
  2. namespace common\libraries;
  3. /**
  4. * $Id: libraries_autoloader.class.php 236 2009-11-16 12:56:59Z scaramanga $
  5. *
  6. * Usage
  7. *
  8. * Autoloader::Synch(null, null, true);
  9. *
  10. * To update the map with the file system.
  11. *
  12. * @package common
  13. */
  14. class Autoloader
  15. {
  16. private static $map = array(
  17. 'Application' => '/application.class.php',
  18. 'ApplicationComponent' => '/application_component.class.php',
  19. 'Autoloader' => '/autoloader.class.php',
  20. 'BasicApplication' => '/basic_application.class.php',
  21. 'Block' => '/block.class.php',
  22. 'BlockConnectorBase' => '/block_connector_base.class.php',
  23. 'CoreApplication' => '/core_application.class.php',
  24. 'CoreApplicationComponent' => '/core_application_component.class.php',
  25. 'Installer' => '/installer.class.php',
  26. 'LauncherApplication' => '/launcher_application.class.php',
  27. 'Redirect' => '/redirect.class.php',
  28. 'ResourceManager' => '/resource_manager.class.php',
  29. 'SubManager' => '/sub_manager.class.php',
  30. 'SubManagerComponent' => '/sub_manager_component.class.php',
  31. 'Updater' => '/updater.class.php',
  32. 'Utilities' => '/utilities.class.php',
  33. 'WebApplication' => '/web_application.class.php',
  34. 'WebApplicationComponent' => '/web_application_component.class.php',
  35. 'AjaxManager' => '/ajax/ajax_manager.class.php',
  36. 'JsonAjaxResult' => '/ajax/json_ajax_result.class.php',
  37. 'Authentication' => '/authentication/authentication.class.php',
  38. 'ExternalAuthentication' => '/authentication/external_authentication.class.php',
  39. 'CasAuthentication' => '/authentication/cas/cas_authentication.class.php',
  40. 'CasPassword' => '/authentication/cas/cas_password/cas_password.class.php',
  41. 'DefaultCasPassword' => '/authentication/cas/cas_password/type/default_cas_password.class.php',
  42. 'LdapCasPassword' => '/authentication/cas/cas_password/type/ldap_cas_password.class.php',
  43. 'MysqlCasPassword' => '/authentication/cas/cas_password/type/mysql_cas_password.class.php',
  44. 'WebserviceCasPassword' => '/authentication/cas/cas_password/type/webservice_cas_password.class.php',
  45. 'InvitationAuthentication' => '/authentication/invitation/invitation_authentication.class.php',
  46. 'LdapAuthentication' => '/authentication/ldap/ldap_authentication.class.php',
  47. 'LdapParser' => '/authentication/ldap/ldap_parser.class.php',
  48. 'PlatformAuthentication' => '/authentication/platform/platform_authentication.class.php',
  49. 'ShibbolethAuthentication' => '/authentication/shibboleth/shibboleth_authentication.class.php',
  50. 'CalendarTable' => '/calendar/calendar_table.class.php',
  51. 'DayCalendar' => '/calendar/day_calendar.class.php',
  52. 'MiniDayCalendar' => '/calendar/mini_day_calendar.class.php',
  53. 'MiniMonthCalendar' => '/calendar/mini_month_calendar.class.php',
  54. 'MiniWeekCalendar' => '/calendar/mini_week_calendar.class.php',
  55. 'MonthCalendar' => '/calendar/month_calendar.class.php',
  56. 'WeekCalendar' => '/calendar/week_calendar.class.php',
  57. 'YearCalendar' => '/calendar/year_calendar.class.php',
  58. 'AggregateCondition' => '/condition/aggregate_condition.class.php',
  59. 'AndCondition' => '/condition/and_condition.class.php',
  60. 'Condition' => '/condition/condition.class.php',
  61. 'EqualityCondition' => '/condition/equality_condition.class.php',
  62. 'InequalityCondition' => '/condition/inequality_condition.class.php',
  63. 'InCondition' => '/condition/in_condition.class.php',
  64. 'MultipleAggregateCondition' => '/condition/multiple_aggregate_condition.class.php',
  65. 'NotCondition' => '/condition/not_condition.class.php',
  66. 'OrCondition' => '/condition/or_condition.class.php',
  67. 'PatternMatchCondition' => '/condition/pattern_match_condition.class.php',
  68. 'SubselectCondition' => '/condition/subselect_condition.class.php',
  69. 'Configuration' => '/configuration/configuration.class.php',
  70. 'LocalSetting' => '/configuration/local_setting.class.php',
  71. 'PlatformSetting' => '/configuration/platform_setting.class.php',
  72. 'CssUtilities' => '/css/css_utilities.class.php',
  73. 'DatetimeUtilities' => '/datetime/datetime_utilities.class.php',
  74. 'Timer' => '/datetime/timer.class.php',
  75. 'DebugUtilities' => '/debug/debug_utilities.class.php',
  76. 'Diagnoser' => '/diagnoser/diagnoser.class.php',
  77. 'DiagnoserCellRenderer' => '/diagnoser/diagnoser_cellrenderer.class.php',
  78. 'Export' => '/export/export.class.php',
  79. 'CsvExport' => '/export/csv/csv_export.class.php',
  80. 'ExcelExport' => '/export/excel/excel_export.class.php',
  81. 'ExcelLayout' => '/export/layout/excel_layout.class.php',
  82. 'OdsExport' => '/export/ods/ods_export.class.php',
  83. 'PdfExport' => '/export/pdf/pdf_export.class.php',
  84. 'XmlExport' => '/export/xml/xml_export.class.php',
  85. 'FedoraProxy' => '/fedora/fedora_proxy.class.php',
  86. 'fedora_fs_access_right' => '/fedora/fs/fedora_fs_access_right.class.php',
  87. 'fedora_fs_base' => '/fedora/fs/fedora_fs_base.class.php',
  88. 'fedora_fs_datastream' => '/fedora/fs/fedora_fs_datastream.class.php',
  89. 'fedora_fs_folder' => '/fedora/fs/fedora_fs_folder.class.php',
  90. 'fedora_fs_history' => '/fedora/fs/fedora_fs_history.class.php',
  91. 'fedora_fs_itql_query' => '/fedora/fs/fedora_fs_itql_query.class.php',
  92. 'fedora_fs_lastobjects' => '/fedora/fs/fedora_fs_lastobjects.class.php',
  93. 'fedora_fs_mystuff' => '/fedora/fs/fedora_fs_mystuff.class.php',
  94. 'fedora_fs_object' => '/fedora/fs/fedora_fs_object.class.php',
  95. 'fedora_fs_search' => '/fedora/fs/fedora_fs_search.class.php',
  96. 'fedora_fs_search_by_id' => '/fedora/fs/fedora_fs_search_by_id.class.php',
  97. 'fedora_fs_sparql_query' => '/fedora/fs/fedora_fs_sparql_query.class.php',
  98. 'fedora_fs_store' => '/fedora/fs/fedora_fs_store.class.php',
  99. 'fedora_fs_subject' => '/fedora/fs/fedora_fs_subject.class.php',
  100. 'FoxmlReader' => '/fedora/reader/foxml_reader.class.php',
  101. 'FedoraXmlReader' => '/fedora/reader/xml_reader.class.php',
  102. 'FedoraXmlReaderTopDownIterator' => '/fedora/reader/xml_reader.class.php',
  103. 'FedoraXmlReaderEmpty' => '/fedora/reader/xml_reader_empty.class.php',
  104. 'IteratorEmpty' => '/fedora/reader/xml_reader_empty.class.php',
  105. 'RestClient' => '/webservice/rest/client/rest_client.class.php',
  106. 'RestConfig' => '/fedora/rest/rest_config.class.php',
  107. 'RestProxyBase' => '/fedora/rest/rest_proxy_base.class.php',
  108. 'RestResult' => '/webservice/rest/client/rest_result.class.php',
  109. 'FoxmlWriter' => '/fedora/writer/foxml_writer.class.php',
  110. 'IdFactory' => '/fedora/writer/id_factory.class.php',
  111. 'XmlWriterBase' => '/fedora/writer/xml_writer_base.class.php',
  112. 'Filecompression' => '/filecompression/filecompression.class.php',
  113. 'PclzipFilecompression' => '/filecompression/pclzip/pclzip_filecompression.class.php',
  114. 'Filesystem' => '/filesystem/filesystem.class.php',
  115. 'FileLogger' => '/filesystem/file_logger.class.php',
  116. 'Path' => '/filesystem/path.class.php',
  117. 'Hashing' => '/hashing/hashing.class.php',
  118. 'Haval256Hashing' => '/hashing/haval256/haval256_hashing.class.php',
  119. 'Md5Hashing' => '/hashing/md5/md5_hashing.class.php',
  120. 'Sha1Hashing' => '/hashing/sha1/sha1_hashing.class.php',
  121. 'Sha512Hashing' => '/hashing/sha512/sha512_hashing.class.php',
  122. 'WhirlpoolHashing' => '/hashing/whirlpool/whirlpool_hashing.class.php',
  123. 'Banner' => '/html/banner.class.php',
  124. 'BbcodeParser' => '/html/bbcode_parser.class.php',
  125. 'Breadcrumb' => '/html/breadcrumb.class.php',
  126. 'BreadcrumbTrail' => '/html/breadcrumb_trail.class.php',
  127. 'Display' => '/html/display.class.php',
  128. 'Footer' => '/html/footer.class.php',
  129. 'Header' => '/html/header.class.php',
  130. 'Html5Format' => '/html/html5_format.class.php',
  131. 'Html5MediaValidator' => '/html/html5_media_validator.class.php',
  132. 'MessageLogger' => '/html/message_logger.class.php',
  133. 'NotificationMessage' => '/html/notification_message.class.php',
  134. 'Text' => '/html/text.class.php',
  135. 'ActionBarRenderer' => '/html/action_bar/action_bar_renderer.class.php',
  136. 'ActionBarSearchForm' => '/html/action_bar/action_bar_search_form.class.php',
  137. 'ConditionProperty' => '/html/action_bar/condition_property.class.php',
  138. 'FormValidator' => '/html/formvalidator/form_validator.class.php',
  139. 'FormValidatorHtmlEditor' => '/html/formvalidator/form_validator_html_editor.class.php',
  140. 'FormValidatorHtmlEditorOptions' => '/html/formvalidator/form_validator_html_editor_options.class.php',
  141. 'FormValidatorHtmlEditorTemplates' => '/html/formvalidator/form_validator_html_editor_templates.class.php',
  142. 'FormValidatorPage' => '/html/formvalidator/form_validator_page.class.php',
  143. 'FormValidatorTab' => '/html/formvalidator/form_validator_tab.class.php',
  144. 'WizardPageValidator' => '/html/formvalidator/wizard_page_validator.class.php',
  145. 'AdvancedElementFinderElement' => '/html/formvalidator/Element/advanced_element_finder/advanced_element_finder_element.class.php',
  146. 'AdvancedElementFinderElements' => '/html/formvalidator/Element/advanced_element_finder/advanced_element_finder_elements.class.php',
  147. 'AdvancedElementFinderElementType' => '/html/formvalidator/Element/advanced_element_finder/advanced_element_finder_element_type.class.php',
  148. 'AdvancedElementFinderElementTypes' => '/html/formvalidator/Element/advanced_element_finder/advanced_element_finder_element_types.class.php',
  149. 'FormValidatorCkeditorHtmlEditor' => '/html/formvalidator/html_editor/ckeditor_html_editor.class.php',
  150. 'FormValidatorTinymceHtmlEditor' => '/html/formvalidator/html_editor/tinymce_html_editor.class.php',
  151. 'HtmlEditorProcessor' => '/html/formvalidator/html_editor/html_editor_file_browser/html_editor_processor/html_editor_processor.class.php',
  152. 'HtmlEditorCkeditorAudioProcessor' => '/html/formvalidator/html_editor/html_editor_file_browser/html_editor_processor/ckeditor/html_editor_ckeditor_audio_processor.class.php',
  153. 'HtmlEditorCkeditorDailymotionProcessor' => '/html/formvalidator/html_editor/html_editor_file_browser/html_editor_processor/ckeditor/html_editor_ckeditor_dailymotion_processor.class.php',
  154. 'HtmlEditorCkeditorFlashProcessor' => '/html/formvalidator/html_editor/html_editor_file_browser/html_editor_processor/ckeditor/html_editor_ckeditor_flash_processor.class.php',
  155. 'HtmlEditorCkeditorFlashVideoProcessor' => '/html/formvalidator/html_editor/html_editor_file_browser/html_editor_processor/ckeditor/html_editor_ckeditor_flash_video_processor.class.php',
  156. 'HtmlEditorCkeditorHandbookItemProcessor' => '/html/formvalidator/html_editor/html_editor_file_browser/html_editor_processor/ckeditor/html_editor_ckeditor_handbook_item_processor.class.php',
  157. 'HtmlEditorCkeditorImageProcessor' => '/html/formvalidator/html_editor/html_editor_file_browser/html_editor_processor/ckeditor/html_editor_ckeditor_image_processor.class.php',
  158. 'HtmlEditorCkeditorVideoProcessor' => '/html/formvalidator/html_editor/html_editor_file_browser/html_editor_processor/ckeditor/html_editor_ckeditor_video_processor.class.php',
  159. 'HtmlEditorCkeditorVimeoProcessor' => '/html/formvalidator/html_editor/html_editor_file_browser/html_editor_processor/ckeditor/html_editor_ckeditor_vimeo_processor.class.php',
  160. 'HtmlEditorCkeditorYoutubeProcessor' => '/html/formvalidator/html_editor/html_editor_file_browser/html_editor_processor/ckeditor/html_editor_ckeditor_youtube_processor.class.php',
  161. 'HtmlEditorRepoViewer' => '/html/formvalidator/html_editor/html_editor_file_browser/html_editor_repo_viewer/html_editor_repo_viewer.class.php',
  162. 'HtmlEditorAudioRepoViewer' => '/html/formvalidator/html_editor/html_editor_file_browser/html_editor_repo_viewer/audio/html_editor_audio_repo_viewer.class.php',
  163. 'HtmlEditorAudioRepoViewerBrowserComponent' => '/html/formvalidator/html_editor/html_editor_file_browser/html_editor_repo_viewer/audio/component/browser.class.php',
  164. 'HtmlEditorAudioRepoViewerCreatorComponent' => '/html/formvalidator/html_editor/html_editor_file_browser/html_editor_repo_viewer/audio/component/creator.class.php',
  165. 'HtmlEditorAudioRepoViewerViewerComponent' => '/html/formvalidator/html_editor/html_editor_file_browser/html_editor_repo_viewer/audio/component/viewer.class.php',
  166. 'AudioContentObjectTable' => '/html/formvalidator/html_editor/html_editor_file_browser/html_editor_repo_viewer/audio/component/audio_content_object_table/audio_content_object_table.class.php',
  167. 'AudioContentObjectTableCellRenderer' => '/html/formvalidator/html_editor/html_editor_file_browser/html_editor_repo_viewer/audio/component/audio_content_object_table/audio_content_object_table_cell_renderer.class.php',
  168. 'AudioContentObjectTableColumnModel' => '/html/formvalidator/html_editor/html_editor_file_browser/html_editor_repo_viewer/audio/component/audio_content_object_table/audio_content_object_table_column_model.class.php',
  169. 'AudioContentObjectTableDataProvider' => '/html/formvalidator/html_editor/html_editor_file_browser/html_editor_repo_viewer/audio/component/audio_content_object_table/audio_content_object_table_data_provider.class.php',
  170. 'HtmlEditorDailymotionRepoViewer' => '/html/formvalidator/html_editor/html_editor_file_browser/html_editor_repo_viewer/dailymotion/html_editor_dailymotion_repo_viewer.class.php',
  171. 'HtmlEditorFlashRepoViewer' => '/html/formvalidator/html_editor/html_editor_file_browser/html_editor_repo_viewer/flash/html_editor_flash_repo_viewer.class.php',
  172. 'HtmlEditorFlashRepoViewerBrowserComponent' => '/html/formvalidator/html_editor/html_editor_file_browser/html_editor_repo_viewer/flash/component/browser.class.php',
  173. 'HtmlEditorFlashRepoViewerCreatorComponent' => '/html/formvalidator/html_editor/html_editor_file_browser/html_editor_repo_viewer/flash/component/creator.class.php',
  174. 'HtmlEditorFlashRepoViewerViewerComponent' => '/html/formvalidator/html_editor/html_editor_file_browser/html_editor_repo_viewer/flash/component/viewer.class.php',
  175. 'FlashContentObjectTable' => '/html/formvalidator/html_editor/html_editor_file_browser/html_editor_repo_viewer/flash/component/flash_content_object_table/flash_content_object_table.class.php',
  176. 'FlashContentObjectTableCellRenderer' => '/html/formvalidator/html_editor/html_editor_file_browser/html_editor_repo_viewer/flash/component/flash_content_object_table/flash_content_object_table_cell_renderer.class.php',
  177. 'FlashContentObjectTableColumnModel' => '/html/formvalidator/html_editor/html_editor_file_browser/html_editor_repo_viewer/flash/component/flash_content_object_table/flash_content_object_table_column_model.class.php',
  178. 'FlashContentObjectTableDataProvider' => '/html/formvalidator/html_editor/html_editor_file_browser/html_editor_repo_viewer/flash/component/flash_content_object_table/flash_content_object_table_data_provider.class.php',
  179. 'HtmlEditorFlashVideoRepoViewer' => '/html/formvalidator/html_editor/html_editor_file_browser/html_editor_repo_viewer/flash_video/html_editor_flash_video_repo_viewer.class.php',
  180. 'HtmlEditorFlashVideoRepoViewerBrowserComponent' => '/html/formvalidator/html_editor/html_editor_file_browser/html_editor_repo_viewer/flash_video/component/browser.class.php',
  181. 'HtmlEditorFlashVideoRepoViewerCreatorComponent' => '/html/formvalidator/html_editor/html_editor_file_browser/html_editor_repo_viewer/flash_video/component/creator.class.php',
  182. 'HtmlEditorFlashVideoRepoViewerViewerComponent' => '/html/formvalidator/html_editor/html_editor_file_browser/html_editor_repo_viewer/flash_video/component/viewer.class.php',
  183. 'FlashVideoContentObjectTable' => '/html/formvalidator/html_editor/html_editor_file_browser/html_editor_repo_viewer/flash_video/component/flash_video_content_object_table/flash_video_content_object_table.class.php',
  184. 'FlashVideoContentObjectTableCellRenderer' => '/html/formvalidator/html_editor/html_editor_file_browser/html_editor_repo_viewer/flash_video/component/flash_video_content_object_table/flash_video_content_object_table_cell_renderer.class.php',
  185. 'FlashVideoContentObjectTableColumnModel' => '/html/formvalidator/html_editor/html_editor_file_browser/html_editor_repo_viewer/flash_video/component/flash_video_content_object_table/flash_video_content_object_table_column_model.class.php',
  186. 'FlashVideoContentObjectTableDataProvider' => '/html/formvalidator/html_editor/html_editor_file_browser/html_editor_repo_viewer/flash_video/component/flash_video_content_object_table/flash_video_content_object_table_data_provider.class.php',
  187. 'HtmlEditorHandbookItemRepoViewer' => '/html/formvalidator/html_editor/html_editor_file_browser/html_editor_repo_viewer/handbook_item/html_editor_handbook_item_repo_viewer.class.php',
  188. 'HtmlEditorHandbookItemRepoViewerBrowserComponent' => '/html/formvalidator/html_editor/html_editor_file_browser/html_editor_repo_viewer/handbook_item/component/browser.class.php',
  189. 'HtmlEditorHandbookItemRepoViewerCreatorComponent' => '/html/formvalidator/html_editor/html_editor_file_browser/html_editor_repo_viewer/handbook_item/component/creator.class.php',
  190. 'HtmlEditorHandbookItemRepoViewerViewerComponent' => '/html/formvalidator/html_editor/html_editor_file_browser/html_editor_repo_viewer/handbook_item/component/viewer.class.php',
  191. 'HandbookItemContentObjectTable' => '/html/formvalidator/html_editor/html_editor_file_browser/html_editor_repo_viewer/handbook_item/component/handbook_item_content_object_table/handbook_item_content_object_table.class.php',
  192. 'HandbookItemContentObjectTableCellRenderer' => '/html/formvalidator/html_editor/html_editor_file_browser/html_editor_repo_viewer/handbook_item/component/handbook_item_content_object_table/handbook_item_content_object_table_cell_renderer.class.php',
  193. 'HandbookItemContentObjectTableColumnModel' => '/html/formvalidator/html_editor/html_editor_file_browser/html_editor_repo_viewer/handbook_item/component/handbook_item_content_object_table/handbook_item_content_object_table_column_model.class.php',
  194. 'HandbookItemContentObjectTableDataProvider' => '/html/formvalidator/html_editor/html_editor_file_browser/html_editor_repo_viewer/handbook_item/component/handbook_item_content_object_table/handbook_item_content_object_table_data_provider.class.php',
  195. 'HtmlEditorImageRepoViewer' => '/html/formvalidator/html_editor/html_editor_file_browser/html_editor_repo_viewer/image/html_editor_image_repo_viewer.class.php',
  196. 'HtmlEditorImageRepoViewerBrowserComponent' => '/html/formvalidator/html_editor/html_editor_file_browser/html_editor_repo_viewer/image/component/browser.class.php',
  197. 'HtmlEditorImageRepoViewerCreatorComponent' => '/html/formvalidator/html_editor/html_editor_file_browser/html_editor_repo_viewer/image/component/creator.class.php',
  198. 'HtmlEditorImageRepoViewerViewerComponent' => '/html/formvalidator/html_editor/html_editor_file_browser/html_editor_repo_viewer/image/component/viewer.class.php',
  199. 'ImageContentObjectTable' => '/html/formvalidator/html_editor/html_editor_file_browser/html_editor_repo_viewer/image/component/image_content_object_table/image_content_object_table.class.php',
  200. 'ImageContentObjectTableCellRenderer' => '/html/formvalidator/html_editor/html_editor_file_browser/html_editor_repo_viewer/image/component/image_content_object_table/image_content_object_table_cell_renderer.class.php',
  201. 'ImageContentObjectTableColumnModel' => '/html/formvalidator/html_editor/html_editor_file_browser/html_editor_repo_viewer/image/component/image_content_object_table/image_content_object_table_column_model.class.php',
  202. 'ImageContentObjectTableDataProvider' => '/html/formvalidator/html_editor/html_editor_file_browser/html_editor_repo_viewer/image/component/image_content_object_table/image_content_object_table_data_provider.class.php',
  203. 'HtmlEditorVideoRepoViewer' => '/html/formvalidator/html_editor/html_editor_file_browser/html_editor_repo_viewer/video/html_editor_video_repo_viewer.class.php',
  204. 'HtmlEditorVideoRepoViewerComponent' => '/html/formvalidator/html_editor/html_editor_file_browser/html_editor_repo_viewer/video/html_editor_video_repo_viewer_component.class.php',
  205. 'HtmlEditorVideoRepoViewerBrowserComponent' => '/html/formvalidator/html_editor/html_editor_file_browser/html_editor_repo_viewer/video/component/browser.class.php',
  206. 'HtmlEditorVideoRepoViewerCreatorComponent' => '/html/formvalidator/html_editor/html_editor_file_browser/html_editor_repo_viewer/video/component/creator.class.php',
  207. 'HtmlEditorVideoRepoViewerViewerComponent' => '/html/formvalidator/html_editor/html_editor_file_browser/html_editor_repo_viewer/video/component/viewer.class.php',
  208. 'VideoContentObjectTable' => '/html/formvalidator/html_editor/html_editor_file_browser/html_editor_repo_viewer/video/component/video_content_object_table/video_content_object_table.class.php',
  209. 'VideoContentObjectTableCellRenderer' => '/html/formvalidator/html_editor/html_editor_file_browser/html_editor_repo_viewer/video/component/video_content_object_table/video_content_object_table_cell_renderer.class.php',
  210. 'VideoContentObjectTableColumnModel' => '/html/formvalidator/html_editor/html_editor_file_browser/html_editor_repo_viewer/video/component/video_content_object_table/video_content_object_table_column_model.class.php',
  211. 'VideoContentObjectTableDataProvider' => '/html/formvalidator/html_editor/html_editor_file_browser/html_editor_repo_viewer/video/component/video_content_object_table/video_content_object_table_data_provider.class.php',
  212. 'HtmlEditorVimeoRepoViewer' => '/html/formvalidator/html_editor/html_editor_file_browser/html_editor_repo_viewer/vimeo/html_editor_vimeo_repo_viewer.class.php',
  213. 'HtmlEditorYoutubeRepoViewer' => '/html/formvalidator/html_editor/html_editor_file_browser/html_editor_repo_viewer/youtube/html_editor_youtube_repo_viewer.class.php',
  214. 'HtmlEditorYoutubeRepoViewerBrowserComponent' => '/html/formvalidator/html_editor/html_editor_file_browser/html_editor_repo_viewer/youtube/component/browser.class.php',
  215. 'HtmlEditorYoutubeRepoViewerCreatorComponent' => '/html/formvalidator/html_editor/html_editor_file_browser/html_editor_repo_viewer/youtube/component/creator.class.php',
  216. 'HtmlEditorYoutubeRepoViewerViewerComponent' => '/html/formvalidator/html_editor/html_editor_file_browser/html_editor_repo_viewer/youtube/component/viewer.class.php',
  217. 'FormValidatorCkeditorHtmlEditorOptions' => '/html/formvalidator/html_editor_options/ckeditor_html_editor_options.class.php',
  218. 'FormValidatorTinymceHtmlEditorOptions' => '/html/formvalidator/html_editor_options/tinymce_html_editor_options.class.php',
  219. 'FormValidatorCkeditorHtmlEditorTemplates' => '/html/formvalidator/html_editor_templates/ckeditor_html_editor_templates.class.php',
  220. 'FormValidatorTinymceHtmlEditorTemplates' => '/html/formvalidator/html_editor_templates/tinymce_html_editor_templates.class.php',
  221. 'ChamiloTemplate' => '/html/layout/chamilo_template.class.php',
  222. 'ChamiloTemplateCompiler' => '/html/layout/chamilo_template_compiler.class.php',
  223. 'Phpbb2TemplateWrapper' => '/html/layout/phpbb2_template_wrapper.class.php',
  224. 'TemplateCache' => '/html/layout/template_cache.class.php',
  225. 'Theme' => '/html/layout/theme.class.php',
  226. 'ThemeManager' => '/html/layout/theme_manager.class.php',
  227. 'DatabaseTemplateCache' => '/html/layout/template_cache/database_template_cache.class.php',
  228. 'FileTemplateCache' => '/html/layout/template_cache/file_template_cache.class.php',
  229. 'CollapsedTreeMenuRenderer' => '/html/menu/collapsed_tree_menu_renderer.class.php',
  230. 'DragAndDropTreeMenuRenderer' => '/html/menu/drag_and_drop_tree_menu_renderer.class.php',
  231. 'OptionsMenuRenderer' => '/html/menu/options_menu_renderer.class.php',
  232. 'TreeMenuRenderer' => '/html/menu/tree_menu_renderer.class.php',
  233. 'XmlTreeMenuRenderer' => '/html/menu/xml_tree_menu_renderer.class.php',
  234. 'GenericTree' => '/html/menu/tree_menu/generic_tree.class.php',
  235. 'TreeMenu' => '/html/menu/tree_menu/tree_menu.class.php',
  236. 'TreeMenuDataProvider' => '/html/menu/tree_menu/tree_menu_data_provider.class.php',
  237. 'TreeMenuItem' => '/html/menu/tree_menu/tree_menu_item.class.php',
  238. 'GalleryTable' => '/html/table/gallery_table.class.php',
  239. 'GalleryTableFromArray' => '/html/table/gallery_table.class.php',
  240. 'PropertiesTable' => '/html/table/properties_table.class.php',
  241. 'SimpleTable' => '/html/table/simple_table.class.php',
  242. 'SortableTable' => '/html/table/sortable_table.class.php',
  243. 'SortableTableFromArray' => '/html/table/sortable_table.class.php',
  244. 'StaticTableColumn' => '/html/table/static_table_column.class.php',
  245. 'TableColumn' => '/html/table/table_column.class.php',
  246. 'TableSort' => '/html/table/table_sort.class.php',
  247. 'GalleryObjectTable' => '/html/table/gallery_object_table/gallery_object_table.class.php',
  248. 'GalleryObjectTableCellRenderer' => '/html/table/gallery_object_table/gallery_object_table_cell_renderer.class.php',
  249. 'GalleryObjectTableDataProvider' => '/html/table/gallery_object_table/gallery_object_table_data_provider.class.php',
  250. 'GalleryObjectTableProperty' => '/html/table/gallery_object_table/gallery_object_table_property.class.php',
  251. 'GalleryObjectTablePropertyModel' => '/html/table/gallery_object_table/gallery_object_table_property_model.class.php',
  252. 'ObjectTable' => '/html/table/object_table/object_table.class.php',
  253. 'ObjectTableCellRenderer' => '/html/table/object_table/object_table_cell_renderer.class.php',
  254. 'ObjectTableColumn' => '/html/table/object_table/object_table_column.class.php',
  255. 'ObjectTableColumnModel' => '/html/table/object_table/object_table_column_model.class.php',
  256. 'ObjectTableDataProvider' => '/html/table/object_table/object_table_data_provider.class.php',
  257. 'ObjectTableFormAction' => '/html/table/object_table/object_table_form_action.class.php',
  258. 'ObjectTableFormActions' => '/html/table/object_table/object_table_form_actions.class.php',
  259. 'ObjectTableOrder' => '/html/table/object_table/object_table_order.class.php',
  260. 'DynamicAction' => '/html/tabs/dynamic_action.class.php',
  261. 'DynamicActionsTab' => '/html/tabs/dynamic_actions_tab.class.php',
  262. 'DynamicContentTab' => '/html/tabs/dynamic_content_tab.class.php',
  263. 'DynamicFormTab' => '/html/tabs/dynamic_form_tab.class.php',
  264. 'DynamicFormTabsRenderer' => '/html/tabs/dynamic_form_tabs_renderer.class.php',
  265. 'DynamicTab' => '/html/tabs/dynamic_tab.class.php',
  266. 'DynamicTabsRenderer' => '/html/tabs/dynamic_tabs_renderer.class.php',
  267. 'DynamicVisualTab' => '/html/tabs/dynamic_visual_tab.class.php',
  268. 'DynamicVisualTabsRenderer' => '/html/tabs/dynamic_visual_tabs_renderer.class.php',
  269. 'Toolbar' => '/html/toolbar/toolbar.class.php',
  270. 'ToolbarItem' => '/html/toolbar/toolbar_item.class.php',
  271. 'HttpHeader' => '/http/http_header.class.php',
  272. 'ImageManipulation' => '/image_manipulation/image_manipulation.class.php',
  273. 'GdImageManipulation' => '/image_manipulation/gd/gd_image_manipulation.class.php',
  274. 'Import' => '/import/import.class.php',
  275. 'Ceo' => '/ims/chamilo/ceo.class.php',
  276. 'Chamilo' => '/ims/chamilo/chamilo.class.php',
  277. 'Log' => '/ims/chamilo/log.class.php',
  278. 'OnlineLog' => '/ims/chamilo/log.class.php',
  279. 'EmptyLog' => '/ims/chamilo/log.class.php',
  280. 'ObjectCache' => '/ims/chamilo/object_cache.class.php',
  281. 'BufferedObjectExport' => '/ims/chamilo/export/buffered_object_export.class.php',
  282. 'EmptyObjectExport' => '/ims/chamilo/export/empty_object_export.class.php',
  283. 'ObjectExportFactory' => '/ims/chamilo/export/object_export_factory.class.php',
  284. 'ObjectExportSettings' => '/ims/chamilo/export/object_export_settings.class.php',
  285. 'BufferedObjectImport' => '/ims/chamilo/import/buffered_object_import.class.php',
  286. 'EmptyObjectImport' => '/ims/chamilo/import/empty_object_import.class.php',
  287. 'ObjectImportFactory' => '/ims/chamilo/import/object_import_factory.class.php',
  288. 'ObjectImportSettings' => '/ims/chamilo/import/object_import_settings.class.php',
  289. 'ImsIdFactory' => '/ims/common/ims_id_factory.class.php',
  290. 'ImsXmlReader' => '/ims/common/reader/ims_xml_reader.class.php',
  291. 'ImsXmlReaderTopDownIterator' => '/ims/common/reader/ims_xml_reader.class.php',
  292. 'ImsXmlReaderEmpty' => '/ims/common/reader/ims_xml_reader_empty.class.php',
  293. 'ImsIteratorEmpty' => '/ims/common/reader/ims_xml_reader_empty.class.php',
  294. 'ImsXmlWriter' => '/ims/common/writer/ims_xml_writer.class.php',
  295. 'LomWriter' => '/ims/common/writer/lom_writer.class.php',
  296. 'Cp' => '/ims/cp/cp.class.php',
  297. 'ImscpManifestReader' => '/ims/cp/reader/imscp_manifest_reader.class.php',
  298. 'ImscpObjectReader' => '/ims/cp/reader/imscp_object_reader.class.php',
  299. 'ImscpManifestWriter' => '/ims/cp/writer/imscp_manifest_writer.class.php',
  300. 'ImscpObjectWriter' => '/ims/cp/writer/imscp_object_writer.class.php',
  301. 'DebugUtil2' => '/ims/lib/debug_util.class.php',
  302. 'FileUtil' => '/ims/lib/file_util.class.php',
  303. 'MathML' => '/ims/lib/math_ml.class.php',
  304. 'shape' => '/ims/lib/shape.class.php',
  305. 'Wildcard' => '/ims/lib/wildcard.class.php',
  306. 'Xhtml' => '/ims/lib/xhtml.class.php',
  307. 'Qti' => '/ims/qti/qti.class.php',
  308. 'QtiEmptyResourceManager' => '/ims/qti/qti_empty_resource_manager.class.php',
  309. 'QtiExportResourceManager' => '/ims/qti/qti_export_resource_manager.class.php',
  310. 'QtiImportResourceManager' => '/ims/qti/qti_import_resource_manager.class.php',
  311. 'QtiInterpreter' => '/ims/qti/qti_interpreter.class.php',
  312. 'QtiPartialRenderer' => '/ims/qti/qti_partial_renderer.class.php',
  313. 'QtiRendererBase' => '/ims/qti/qti_renderer_base.class.php',
  314. 'QtiResourceManagerBase' => '/ims/qti/qti_resource_manager_base.class.php',
  315. 'QtiImportStrategyBase' => '/ims/qti/import_strategy/qti_import_strategy_base.class.php',
  316. 'QtiImportStrategyChain' => '/ims/qti/import_strategy/qti_import_strategy_chain.class.php',
  317. 'QtiImportStrategyEmpty' => '/ims/qti/import_strategy/qti_import_strategy_empty.class.php',
  318. 'QtiImportStrategyFailover' => '/ims/qti/import_strategy/qti_import_strategy_failover.class.php',
  319. 'QtiImportStrategyGeneric' => '/ims/qti/import_strategy/qti_import_strategy_generic.class.php',
  320. 'QtiImportStrategyText' => '/ims/qti/import_strategy/qti_import_strategy_text.class.php',
  321. 'QtiMoodleReimportStrategy' => '/ims/qti/import_strategy/qti_moodle_reimport_strategy.class.php',
  322. 'ImsQtiReader' => '/ims/qti/reader/ims_qti_reader.class.php',
  323. 'ImsQtiWriter' => '/ims/qti/writer/ims_qti_writer.class.php',
  324. 'AdministrationComponent' => '/interface/administration_component.class.php',
  325. 'NoContextComponent' => '/interface/no_context_component.class.php',
  326. 'AttachmentSupport' => '/interface/attachment_support.class.php',
  327. 'Categorizable' => '/interface/categorizable.class.php',
  328. 'ChangeablePassword' => '/interface/changeable_password.class.php',
  329. 'ChangeableUsername' => '/interface/changeable_username.class.php',
  330. 'ComplexContentObjectDisclosure' => '/interface/complex_content_object_disclosure.class.php',
  331. 'ComplexContentObjectSupport' => '/interface/complex_content_object_support.class.php',
  332. 'ComplexMenuSupport' => '/interface/complex_menu_support.class.php',
  333. 'DelegateComponent' => '/interface/delegate_component.class.php',
  334. 'ForcedVersionSupport' => '/interface/forced_version_support.class.php',
  335. 'HelperContentObjectSupport' => '/interface/helper_content_object_support.class.php',
  336. 'UserRegistrationSupport' => '/interface/user_registration_support.class.php',
  337. 'Versionable' => '/interface/versionable.class.php',
  338. 'JavascriptUtilities' => '/javascript/javascript_utilities.class.php',
  339. 'AttachmentViewerLauncher' => '/launcher/attachment_viewer/attachment_viewer_launcher.class.php',
  340. 'ComplexBuilderLauncher' => '/launcher/complex_builder/complex_builder_launcher.class.php',
  341. 'ComplexDisplayPreviewLauncher' => '/launcher/complex_display_preview/complex_display_preview_launcher.class.php',
  342. 'ExternalRepositoryLauncher' => '/launcher/external_repository/external_repository_launcher.class.php',
  343. 'HtmlEditorFileLauncher' => '/launcher/html_editor_file/html_editor_file_launcher.class.php',
  344. 'RepoViewerLauncher' => '/launcher/repo_viewer/repo_viewer_launcher.class.php',
  345. 'VideoConferencingLauncher' => '/launcher/video_conferencing/video_conferencing_launcher.class.php',
  346. 'Mail' => '/mail/mail.class.php',
  347. 'DefaultMail' => '/mail/default/default_mail.class.php',
  348. 'PhpmailerMail' => '/mail/phpmailer/phpmailer_mail.class.php',
  349. 'MimeUtil' => '/mime/mime_util.class.php',
  350. 'PublicationRSS' => '/rss/publication_rss.class.php',
  351. 'RSSEngine' => '/rss/rss_engine.class.php',
  352. 'BasicRSS' => '/rss/builders/basic_rss.class.php',
  353. 'CombinedRSS' => '/rss/builders/combined_rss.class.php',
  354. 'Channel' => '/rss/objects/channel.class.php',
  355. 'CombinedChannel' => '/rss/objects/combined_channel.class.php',
  356. 'RSSStream' => '/rss/objects/rss_stream.class.php',
  357. 'Security' => '/security/security.class.php',
  358. 'Cookie' => '/session/cookie.class.php',
  359. 'Request' => '/session/request.class.php',
  360. 'Session' => '/session/session.class.php',
  361. 'session_handler' => '/session/session_handler.class.php',
  362. 'ArrayResultSet' => '/storage/array_result_set.class.php',
  363. 'ConditionTranslator' => '/storage/condition_translator.class.php',
  364. 'DataClass' => '/storage/data_class.class.php',
  365. 'NestedTreeNode' => '/storage/nested_tree_node.class.php',
  366. 'ResultSet' => '/storage/result_set.class.php',
  367. 'StorageAliasGenerator' => '/storage/storage_alias_generator.class.php',
  368. 'Mdb2ConditionTranslator' => '/storage/mdb2/condition_translator.class.php',
  369. 'Mdb2Connection' => '/storage/mdb2/connection.class.php',
  370. 'Mdb2Database' => '/storage/mdb2/database.class.php',
  371. 'Mdb2ResultSet' => '/storage/mdb2/result_set.class.php',
  372. 'DatabaseBackup' => '/storage/mdb2/backup/database_backup.class.php',
  373. 'MysqlBackup' => '/storage/mdb2/backup/types/mysql_backup.class.php',
  374. 'SimpleTemplate' => '/string/simple_template.class.php',
  375. 'StringUtilities' => '/string/string_utilities.class.php',
  376. 'CacheData' => '/system_cache/cache_data.class.php',
  377. 'CacheDataManager' => '/system_cache/cache_data_manager.class.php',
  378. 'CacheDataTransient' => '/system_cache/cache_data_transient.class.php',
  379. 'CacheSynch' => '/system_cache/cache_synch.class.php',
  380. 'ClientCache' => '/system_cache/client_cache.class.php',
  381. 'ExitAction' => '/system_cache/exit_action.class.php',
  382. 'FileCache' => '/system_cache/file_cache.class.php',
  383. 'ResourceCache' => '/system_cache/resource_cache.class.php',
  384. 'SystemCache' => '/system_cache/system_cache.class.php',
  385. 'ChamiloTestSuite' => '/test/chamilo_test_suite.class.php',
  386. 'Translation' => '/translation/translation.class.php',
  387. 'application_generator\MyTemplate' => '/util/application_generator/my_template.class.php',
  388. 'application_generator\AutoloaderGenerator' => '/util/application_generator/autoloader_generator/autoloader_generator.class.php',
  389. 'application_generator\ComponentGenerator' => '/util/application_generator/component_generator/component_generator.class.php',
  390. 'application_generator\DataClassGenerator' => '/util/application_generator/data_class_generator/data_class_generator.class.php',
  391. 'application_generator\DataManagerGenerator' => '/util/application_generator/data_manager_generator/data_manager_generator.class.php',
  392. 'application_generator\FormGenerator' => '/util/application_generator/form_generator/form_generator.class.php',
  393. 'application_generator\InstallGenerator' => '/util/application_generator/install_generator/install_generator.class.php',
  394. 'application_generator\ManagerGenerator' => '/util/application_generator/manager_generator/manager_generator.class.php',
  395. 'application_generator\PackageInfoGenerator' => '/util/application_generator/package_info_generator/package_info_generator.class.php',
  396. 'application_generator\RightsGenerator' => '/util/application_generator/rights_generator/rights_generator.class.php',
  397. 'application_generator\SortableTableGenerator' => '/util/application_generator/sortable_table_generator/sortable_table_generator.class.php',
  398. 'content_object_generator\MyTemplate' => '/util/content_object_generator/my_template.class.php',
  399. 'content_object_generator\AdditionalClassGenerator' => '/util/content_object_generator/additional_class_generator/additional_class_generator.class.php',
  400. 'content_object_generator\DataClassGenerator' => '/util/content_object_generator/data_class_generator/data_class_generator.class.php',
  401. 'content_object_generator\FormGenerator' => '/util/content_object_generator/form_generator/form_generator.class.php',
  402. 'content_object_generator\PackageInfoGenerator' => '/util/content_object_generator/package_info_generator/package_info_generator.class.php',
  403. 'RssIconGenerator' => '/util/rss_icon_generator/rss_icon_generator.class.php',
  404. 'CodeUtilities' => '/util/various/code_utilities.class.php',
  405. 'AutoloaderUtilities' => '/util/various/autoloader_utilities.class.php',
  406. 'Validator' => '/validator/validator.class.php',
  407. 'Webservice' => '/webservice/webservice.class.php',
  408. 'WebserviceAuthentication' => '/webservice/authentication/webservice_authentication.class.php',
  409. 'ChamiloWebserviceAuthentication' => '/webservice/authentication/chamilo/chamilo_webservice_authentication.class.php',
  410. 'DigestWebserviceAuthentication' => '/webservice/authentication/digest/digest_webservice_authentication.class.php',
  411. 'OauthWebserviceAuthentication' => '/webservice/authentication/oauth/oauth_webservice_authentication.class.php',
  412. 'ChamiloRestServer' => '/webservice/rest/chamilo_rest_server.class.php',
  413. 'NoAuthenticationWebservice' => '/webservice/rest/no_authentication_webservice.class.php',
  414. 'RestMessageRenderer' => '/webservice/rest/rest_message_renderer.class.php',
  415. 'RestServer' => '/webservice/rest/rest_server.class.php',
  416. 'SuccessRestMessage' => '/webservice/rest/success_rest_message.class.php',
  417. 'WebserviceHandler' => '/webservice/rest/webservice_handler.class.php',
  418. 'RestAuthentication' => '/webservice/rest/client/rest_authentication.class.php',
  419. 'RestData' => '/webservice/rest/client/rest_data.class.php',
  420. 'CurlBasicRestAuthentication' => '/webservice/rest/client/authentication/curl/curl_basic_rest_authentication.class.php',
  421. 'CurlDigestRestAuthentication' => '/webservice/rest/client/authentication/curl/curl_digest_rest_authentication.class.php',
  422. 'CurlRestClient' => '/webservice/rest/client/type/pear_rest_client.class.php',
  423. 'FormRestData' => '/webservice/rest/client/data/form_data.class.php',
  424. 'PlainRestData' => '/webservice/rest/client/data/plain_data.class.php',
  425. 'UrlRestData' => '/webservice/rest/client/data/url_data.class.php',
  426. 'HtmlRestResult' => '/webservice/rest/client/result/html_rest_result.class.php',
  427. 'JsonRestResult' => '/webservice/rest/client/result/json_rest_result.class.php',
  428. 'PlainRestResult' => '/webservice/rest/client/result/plain_rest_result.class.php',
  429. 'XmlRestResult' => '/webservice/rest/client/result/xml_rest_result.class.php',
  430. 'CreateObjectWebserviceHandler' => '/webservice/rest/handler/create_object_webservice_handler.class.php',
  431. 'DeleteObjectWebserviceHandler' => '/webservice/rest/handler/delete_object_webservice_handler.class.php',
  432. 'GetObjectListWebserviceHandler' => '/webservice/rest/handler/get_object_list_webservice_handler.class.php',
  433. 'GetObjectWebserviceHandler' => '/webservice/rest/handler/get_object_webservice_handler.class.php',
  434. 'UpdateObjectWebserviceHandler' => '/webservice/rest/handler/update_object_webservice_handler.class.php',
  435. 'HtmlRestMessageRenderer' => '/webservice/rest/rest_message_renderer/html_rest_message_renderer.class.php',
  436. 'JsonRestMessageRenderer' => '/webservice/rest/rest_message_renderer/json_rest_message_renderer.class.php',
  437. 'PlainRestMessageRenderer' => '/webservice/rest/rest_message_renderer/plain_rest_message_renderer.class.php',
  438. 'XmlRestMessageRenderer' => '/webservice/rest/rest_message_renderer/xml_rest_message_renderer.class.php',
  439. 'SoapNusoapWebservice' => '/webservice/soap/nusoap/soap_nusoap_webservice.class.php',
  440. 'XMLUtilities' => '/xml/xml_utilities.class.php',
  441. 'CommonAjaxGroupsFeed' => '/ajax/groups_feed.class.php'
  442. );
  443. // public static $class_name;
  444. // public static $lower_case;
  445. static function load($classname)
  446. {
  447. if (isset(self::$map[$classname]))
  448. {
  449. require_once __DIR__ . self::$map[$classname];
  450. return true;
  451. }
  452. return false; //to check
  453. // include_once(__DIR__ . '/util/various/code_utilities.class.php');
  454. // self :: $class_name = $classname;
  455. // self :: $lower_case = Utilities :: camelcase_to_underscores(self :: $class_name);
  456. // if (self :: check_first())
  457. // {
  458. // return true;
  459. // }
  460. // if (self :: check_for_system_cache_files())
  461. // {
  462. // return true;
  463. // }
  464. //
  465. // if (self :: check_for_http_files())
  466. // {
  467. // return true;
  468. // }
  469. //
  470. // if (self :: load_files_with_same_directory_name())
  471. // {
  472. // return true;
  473. // }
  474. //
  475. // if (self :: check_for_utilities_files())
  476. // {
  477. // return true;
  478. // }
  479. //
  480. // if (self :: check_for_html_files())
  481. // {
  482. // return true;
  483. // }
  484. //
  485. // if (self :: check_for_fedora_files())
  486. // {
  487. // return true;
  488. // }
  489. //
  490. // if (self :: check_for_interface_files())
  491. // {
  492. // return true;
  493. // }
  494. //
  495. // if (self :: check_for_general_files())
  496. // {
  497. // return true;
  498. // }
  499. //
  500. // if (self :: check_for_conditions())
  501. // {
  502. // return true;
  503. // }
  504. //
  505. // if (self :: check_for_calendar_files())
  506. // {
  507. // return true;
  508. // }
  509. //
  510. // if (self :: check_for_special_files())
  511. // {
  512. // return true;
  513. // }
  514. //
  515. // if (self :: check_for_launcher_files())
  516. // {
  517. // return true;
  518. // }
  519. //
  520. // if (self :: check_for_storage_files())
  521. // {
  522. // return true;
  523. // }
  524. //
  525. // if (self :: check_for_ims_files())
  526. // {
  527. // return true;
  528. // }
  529. //
  530. // if (self :: check_for_webservice_files())
  531. // {
  532. // return true;
  533. // }
  534. //
  535. // return false;
  536. }
  537. /**
  538. * Synchronize the autoloader map with the current file structure.
  539. *
  540. * Searches all files and sub directories for class declarations.
  541. * Creates a map of class name to (relative) file path.
  542. * Update the autoloader with the map declaration if $update equals true.
  543. * Returns a map of class name to file path.
  544. *
  545. * @param string $current_dir The current directory in which we search for class declarations
  546. * @param string $root_dir The root directory. The one containing the autoloader declaration
  547. * @param bool $update If true update the autoloader file if one exists. If false only returns the result.
  548. * @return array Array mapping class name to (not relative) path
  549. */
  550. public static function synch($current_dir = null, $root_dir = null, $update = false)
  551. {
  552. $result = array();
  553. $current_dir = $current_dir ? $current_dir : __DIR__;
  554. $root_dir = $root_dir ? $root_dir : __DIR__;
  555. //plugins are not handled by the autoloader.
  556. if (basename($current_dir) == 'plugin')
  557. {
  558. return $result;
  559. }
  560. $files = Filesystem::get_directory_content($current_dir, Filesystem::LIST_FILES, false);
  561. foreach ($files as $file)
  562. {
  563. if ($file == 'autoloader.class.php')
  564. {
  565. $root_dir = $current_dir;
  566. break;
  567. }
  568. }
  569. foreach ($files as $file)
  570. {
  571. if (StringUtilities::end_with($file, '.class.php', false))
  572. {
  573. $content = file_get_contents($current_dir . '/' . $file);
  574. $content = CodeUtilities::remove_comments($content); //comments may contains class declaration we don't want to capture.
  575. $classes = CodeUtilities::get_classes($content);
  576. $namespace = CodeUtilities::get_namespace($content);
  577. $namespace = $namespace ? $namespace . '\\' : '';
  578. foreach ($classes as $class)
  579. {
  580. /* a few classes have the same namespace and class name
  581. * in this case we let the latest win as this may
  582. * relates to different autoloader.
  583. */
  584. $result[$namespace . $class] = $current_dir . '/' . $file;
  585. }
  586. }
  587. }
  588. $directories = Filesystem::get_directory_content($current_dir, Filesystem::LIST_DIRECTORIES, false);
  589. foreach ($directories as $dir)
  590. {
  591. $items = self::synch($current_dir . '/' . $dir, $root_dir, $update);
  592. $result = array_merge($result, $items);
  593. }
  594. //ksort($result);
  595. if ($current_dir == $root_dir && $update)
  596. {
  597. //an autoloader may not exist. For example for p
  598. $autoloader_path = $root_dir . '/autoloader.class.php';
  599. if (is_readable($autoloader_path))
  600. {
  601. $text = file_get_contents($autoloader_path);
  602. $autoloader_namespace = CodeUtilities::get_namespace($text);
  603. $autoloader_namespace = $autoloader_namespace ? $autoloader_namespace . '\\' : '';
  604. $format = ' private static ' . '$map = array(' . "\n"; //use concat to avoid a false positive
  605. foreach ($result as $key => $path)
  606. {
  607. $key = str_replace($autoloader_namespace, '', $key);
  608. $path = CodeUtilities::relative_path($root_dir, $path);
  609. $format .= " '$key' => '$path',\n";
  610. }
  611. $format .= " );\n";
  612. //remove existing map if it exists
  613. $array_pattern = '/\s*private\s*static\s*\$map.*\)\;/isU';
  614. $text = preg_replace($array_pattern, '', $text);
  615. //add map declaration to the start of the class
  616. $text = preg_replace_callback(CodeUtilities::CLASS_PATTERN, function($match) use($format)
  617. {
  618. return reset($match) . "\n" . $format;
  619. }, $text);
  620. file_put_contents($autoloader_path, $text);
  621. }
  622. }
  623. return $result;
  624. }
  625. // /**
  626. // * We first check those files are the most often required.
  627. // * To speed up loading.
  628. // * I.e. those called in CSS/Javascript when hitting the cache.
  629. // *
  630. // * @return bool
  631. // */
  632. // static function check_first()
  633. // {
  634. // static $check_first_list = null;
  635. // if (empty($check_first_list))
  636. // {
  637. // $check_first_list = array('session' => 'session/sess…

Large files files are truncated, but you can click here to view the full file