PageRenderTime 6ms CodeModel.GetById 120ms app.highlight 39ms RepoModel.GetById 122ms 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

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

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

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