fusionpbx/app
frytimo 08001488f4
Allow namespace in auto loader (#7307)
* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove closing tag

* remove invalid method params

* remove closing tag

* remove closing tag

* Update auto_loader to load each class file in the project
Update the auto_loader class to use an include statement on each file in the project to load the class within the file. This will allow mismatched names within the file to be loaded and mapped according to the declaration instead of the filename. The class is then checked against the parsed classes from the PHP engine so that namespaces are available and mapped to the file they were declared in. An update was also made to the search algorithm used to find a file that was not already loaded by collapsing the array to have only valid matches to increase performance on a cache miss. Logging within the auto_loader has been moved to a function.
Multiple files were modified to allow the include statement. When the class has the `if(class_exists())` statement, the auto_loader is called to check for the class. This caused an infinite loop scenario so all wrappers have been removed. The auto_loader will now break the loop by directly modifying the internal classes array instead of trying to restart with the 'reload_classes' method.

- APCu is used to cache classes so any loading of the classes is done only once. To clear the APCu cache, restart php-fpm or call the auto_loader::clear_cache() function.
- Cache file is used when APCu is not available. To clear the cache remove it from the tmp folder or call the auto_loader::clear_cache() function.
- All classes must no longer have a class_exists wrapper to benefit from the performance boost.
- Classes should not be directly included when the auto_loader is used.

* remove include statement of class file

* Update destinations.php
2025-03-12 13:55:47 -06:00
..
aastra Localization: Add full support for Georgian language (#7110) 2024-08-28 09:59:02 -06:00
access_controls Allow namespace in auto loader (#7307) 2025-03-12 13:55:47 -06:00
avaya Fix Avaya BLF issue on reSUBSCRIBE (#7164) 2024-10-22 19:01:50 -06:00
azure/resources/classes Update azure.php (#4477) 2019-08-30 21:05:01 -04:00
basic_operator_panel Allow namespace in auto loader (#7307) 2025-03-12 13:55:47 -06:00
bridges Allow namespace in auto loader (#7307) 2025-03-12 13:55:47 -06:00
call_block Allow namespace in auto loader (#7307) 2025-03-12 13:55:47 -06:00
call_broadcast Allow namespace in auto loader (#7307) 2025-03-12 13:55:47 -06:00
call_center_active Redirect to the correct domain if using show all (#7265) 2025-02-20 16:30:09 -07:00
call_centers Allow namespace in auto loader (#7307) 2025-03-12 13:55:47 -06:00
call_flows Allow namespace in auto loader (#7307) 2025-03-12 13:55:47 -06:00
call_forward Allow namespace in auto loader (#7307) 2025-03-12 13:55:47 -06:00
call_recordings Allow namespace in auto loader (#7307) 2025-03-12 13:55:47 -06:00
calls_active add new active calls permissions (#7294) 2025-03-06 18:54:57 -07:00
cisco Add the spa_router_mode 2024-12-11 22:06:44 -07:00
click_to_call Corrections in Georgian translation (#7113) 2024-08-31 10:02:51 -06:00
conference_centers Allow namespace in auto loader (#7307) 2025-03-12 13:55:47 -06:00
conference_controls Allow namespace in auto loader (#7307) 2025-03-12 13:55:47 -06:00
conference_profiles Allow namespace in auto loader (#7307) 2025-03-12 13:55:47 -06:00
conferences Allow namespace in auto loader (#7307) 2025-03-12 13:55:47 -06:00
conferences_active Use boolean setting as true boolean (#7284) 2025-03-04 11:25:47 -07:00
database_transactions Use boolean setting as true boolean (#7284) 2025-03-04 11:25:47 -07:00
destinations Allow namespace in auto loader (#7307) 2025-03-12 13:55:47 -06:00
devices Add content card to device export and pin numbers (#7297) 2025-03-10 10:26:27 -06:00
dialplan_inbound Fix temporary permissions 2024-11-29 13:57:01 -07:00
dialplan_outbound Add content card to outbound route add and pin number export (#7308) 2025-03-12 13:37:26 -06:00
dialplans Allow namespace in auto loader (#7307) 2025-03-12 13:55:47 -06:00
domain_limits Simplify the dashboard path 2024-08-21 16:58:44 -06:00
email_queue Allow namespace in auto loader (#7307) 2025-03-12 13:55:47 -06:00
emergency Add CDR Details, Call Recordings Play, and Call Recordings Download to emergency logs (#7301) 2025-03-12 09:40:44 -06:00
event_guard Allow namespace in auto loader (#7307) 2025-03-12 13:55:47 -06:00
extension_settings Allow namespace in auto loader (#7307) 2025-03-12 13:55:47 -06:00
extensions Allow namespace in auto loader (#7307) 2025-03-12 13:55:47 -06:00
fanvil Localization: Add full support for Georgian language (#7110) 2024-08-28 09:59:02 -06:00
fax Allow namespace in auto loader (#7307) 2025-03-12 13:55:47 -06:00
fax_queue Allow namespace in auto loader (#7307) 2025-03-12 13:55:47 -06:00
fifo Allow namespace in auto loader (#7307) 2025-03-12 13:55:47 -06:00
fifo_list Fix end of file line only use one line feed at the end of the file 2024-09-19 16:33:17 -06:00
flyingvoice Disable vad for flying voice by default 2025-02-15 12:09:46 -07:00
follow_me Corrections in Georgian translation (#7113) 2024-08-31 10:02:51 -06:00
gateways Allow namespace in auto loader (#7307) 2025-03-12 13:55:47 -06:00
grandstream Localization: Add full support for Georgian language (#7110) 2024-08-28 09:59:02 -06:00
htek Localization: Add full support for Georgian language (#7110) 2024-08-28 09:59:02 -06:00
ivr_menus Allow namespace in auto loader (#7307) 2025-03-12 13:55:47 -06:00
log_viewer Fix log viewer overflow for log content using word wrap 2024-12-21 11:32:15 -07:00
modules Allow namespace in auto loader (#7307) 2025-03-12 13:55:47 -06:00
music_on_hold Allow namespace in auto loader (#7307) 2025-03-12 13:55:47 -06:00
number_translations Allow namespace in auto loader (#7307) 2025-03-12 13:55:47 -06:00
phrases Allow namespace in auto loader (#7307) 2025-03-12 13:55:47 -06:00
pin_numbers Allow namespace in auto loader (#7307) 2025-03-12 13:55:47 -06:00
poly Localization: Add full support for Georgian language (#7110) 2024-08-28 09:59:02 -06:00
polycom Localization: Add full support for Georgian language (#7110) 2024-08-28 09:59:02 -06:00
provision remove the automatic setting of server connection port in provisioning (#7243) 2025-02-13 14:09:03 -07:00
recordings Allow namespace in auto loader (#7307) 2025-03-12 13:55:47 -06:00
registrations Allow namespace in auto loader (#7307) 2025-03-12 13:55:47 -06:00
ring_groups Allow namespace in auto loader (#7307) 2025-03-12 13:55:47 -06:00
sip_profiles Allow namespace in auto loader (#7307) 2025-03-12 13:55:47 -06:00
sip_status Add the apcu caching ability for performance (#7276) 2025-02-25 17:21:41 -07:00
snom Added support for Snom C620 DECT conference phone (#7155) 2024-10-08 09:45:03 -06:00
sofia_global_settings Allow namespace in auto loader (#7307) 2025-03-12 13:55:47 -06:00
streams Allow namespace in auto loader (#7307) 2025-03-12 13:55:47 -06:00
swissvoice Localization: Add full support for Georgian language (#7110) 2024-08-28 09:59:02 -06:00
switch Allow namespace in auto loader (#7307) 2025-03-12 13:55:47 -06:00
system Use text instead of boolean for ace editor settings (#7285) 2025-03-04 16:30:17 -07:00
time_conditions Allow namespace in auto loader (#7307) 2025-03-12 13:55:47 -06:00
tones Localization: Add full support for Georgian language (#7110) 2024-08-28 09:59:02 -06:00
vars Allow namespace in auto loader (#7307) 2025-03-12 13:55:47 -06:00
voicemail_greetings Allow namespace in auto loader (#7307) 2025-03-12 13:55:47 -06:00
voicemails Allow namespace in auto loader (#7307) 2025-03-12 13:55:47 -06:00
xml_cdr Allow namespace in auto loader (#7307) 2025-03-12 13:55:47 -06:00
yealink Change value of yealink_voice_vad to 0 2025-02-06 12:11:24 -07:00