fusionpbx/resources/classes
Tim Fry 1aaf522e21 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.
2025-03-12 15:30:20 -03:00
..
array_order.php Move the class files from includes to the resources directory. 2013-07-06 07:16:58 +00:00
auto_loader.php Update auto_loader to load each class file in the project 2025-03-12 15:30:20 -03:00
base2n.php Create base2n.php 2023-04-23 01:05:46 -06:00
button.php remove class_exists wrapper for class definitions 2025-03-12 11:16:42 -03:00
cache.php Add the apcu caching ability for performance (#7276) 2025-02-25 17:21:41 -07:00
captcha.php Fix a PHP 8.1 error 2023-06-17 09:08:25 -06:00
cli_option.php Update Font Awesome to v6.6.x, adjust some icon references. 2024-08-09 18:14:52 -06:00
command_option.php introduce new service framework (#6990) 2024-05-31 12:40:46 -06:00
config.php Removed for better backwards compatibility 2024-10-02 11:35:54 -06:00
database.php remove include statement of class file 2025-03-12 11:56:50 -03:00
directory.php Fix temporary permissions 2024-11-29 13:57:01 -07:00
domains.php remove class_exists wrapper for class definitions 2025-03-12 11:16:50 -03:00
email.php remove class_exists wrapper for class definitions 2025-03-12 11:16:11 -03:00
event_socket.php remove instances where a pointer is used in a foreach loop for value (#7108) 2024-08-22 12:41:10 -06:00
file.php Check if the sounds directory exists 2023-05-16 00:36:27 -06:00
google_authenticator.php Update class name FixedBitNotation to base2n 2023-04-23 02:31:44 -06:00
groups.php remove class_exists wrapper for class definitions 2025-03-12 11:16:06 -03:00
logging.php Update logging class (#6829) 2023-11-13 18:55:52 -07:00
menu.php remove class_exists wrapper for class definitions 2025-03-12 11:16:08 -03:00
message.php remove class_exists wrapper for class definitions 2025-03-12 11:16:03 -03:00
modal.php remove class_exists wrapper for class definitions 2025-03-12 11:15:57 -03:00
parsedown.php Add class parsedown.php 2024-05-25 13:23:38 -06:00
permissions.php Fix temporary permissions 2024-11-29 13:57:01 -07:00
schema.php remove include statement of class file 2025-03-12 11:56:46 -03:00
service.php enable foreground mode for services (#7061) 2024-07-23 07:40:49 -06:00
settings.php Use boolean setting as true boolean (#7284) 2025-03-04 11:25:47 -07:00
sounds.php remove instances where a pointer is used in a foreach loop for value (#7108) 2024-08-22 12:41:10 -06:00
switch_settings.php remove class_exists wrapper for class definitions 2025-03-12 11:15:37 -03:00
template.php remove class_exists wrapper for class definitions 2025-03-12 11:15:36 -03:00
text.php Prevent a warning by using isset 2024-05-02 14:05:30 -06:00
token.php exit for loop when matching token for slight performance increase (#7092) 2024-08-15 14:10:08 -06:00
tones.php remove class_exists wrapper for class definitions 2025-03-12 11:15:33 -03:00
user.php Require domain_uuid and user_uuid 2024-04-22 08:48:58 -06:00
vcard.php contacts php 8.1 changes (#6730) 2023-06-01 11:50:12 -06:00
waveform.php Voicemail - Edit: Mitigate PHP 8.x warnings. 2024-05-13 11:39:19 -06:00
xml.php remove class_exists wrapper for class definitions 2025-03-12 11:15:17 -03:00