fusionpbx/resources
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
..
ace Ace Editor: Include license and version note. 2023-09-13 19:05:45 +00:00
bootstrap Template: Integrate compression on included .js and .css files, fix custom_css template variable. 2020-03-19 21:11:53 -06:00
captcha Frytimo pr patches for php8.1 (#6630) 2023-05-05 10:46:37 -06:00
chartjs Update Chartjs and Sortablejs (#6978) 2024-05-16 09:27:00 -06:00
classes Allow namespace in auto loader (#7307) 2025-03-12 13:55:47 -06:00
fontawesome Menu: New option to set icon colors. 2025-03-03 14:08:05 -07:00
fonts Fix empty line printing on console (#6956) 2024-04-23 08:53:14 -06:00
fpdf Removed magic quotes as it was deprecated in PHP 7.4 2023-10-02 12:47:12 -06:00
fpdi Frytimo pr patches for php8.1 (#6630) 2023-05-05 10:46:37 -06:00
functions Update password.php 2019-09-26 16:10:51 -06:00
install/sql Change the agent.contact size from 255 to 1024 2025-01-03 16:53:23 -07:00
javascript Move includes/javascript to resources/javascript. 2013-06-09 04:54:33 +00:00
jquery Update to jQuery 3.6.1 (#6491) 2022-11-07 08:58:38 -07:00
momentjs Revert "Not using momentjs so removing it" 2022-08-01 08:00:35 -06:00
phpmailer Update class.phpmailer.php update for PHP 8.1 2023-06-24 16:59:43 -06:00
pop3 Frytimo pr patches for php8.1 (#6630) 2023-05-05 10:46:37 -06:00
qr_code Delete .phpqrcode.php.swp 2018-08-30 01:34:38 -06:00
sortablejs Update Chartjs and Sortablejs (#6978) 2024-05-16 09:27:00 -06:00
tcpdf TCPDF: Update for PHP 8.1 2023-06-01 22:53:58 +00:00
templates Update algom{$mac}.conf (#7299) 2025-03-10 17:34:43 -06:00
app_languages.php Side / Fixed Menu: Image placeholder tool tip. 2024-10-31 11:49:31 -06:00
check_auth.php Fix the destination login alternate path 2025-02-05 18:09:08 -07:00
cidr.php Bug fixed unset the cidr variable 2023-06-03 10:19:42 -06:00
countries.php \r\n --> \n 2016-04-25 20:30:23 -05:00
footer.php Use boolean setting as true boolean (#7284) 2025-03-04 11:25:47 -07:00
functions.php Fix the forget password feature 2025-01-16 21:49:56 -07:00
header.php fix missing variable in default template (#7222) 2025-01-24 16:05:37 -07:00
licenses.php Update licenses.php 2019-08-22 12:00:02 -06:00
login.php Update login.php 2025-01-28 12:54:09 -07:00
paging.php Frytimo pr patches for php8.1 (#6630) 2023-05-05 10:46:37 -06:00
pdo.php Add new class methods and use them 2023-09-11 01:45:19 -06:00
pdo_vm.php Use magic constant dir (#6711) 2023-06-15 11:28:23 -06:00
persist_form.php Update persist_form.php 2018-06-29 20:02:00 -06:00
persist_form_var.php persistformvar [Function]: Updates for PHP 8.1 2023-05-17 07:02:02 +00:00
php.php Use boolean setting as true boolean (#7284) 2025-03-04 11:25:47 -07:00
require.php Optimize require.php (#7286) 2025-03-11 14:37:31 -06:00
switch.php Allow namespace in auto loader (#7307) 2025-03-12 13:55:47 -06:00
uuid.php Use magic constant dir (#6711) 2023-06-15 11:28:23 -06:00