fusionpbx/resources/classes
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
..
array_order.php Move the class files from includes to the resources directory. 2013-07-06 07:16:58 +00:00
auto_loader.php Allow namespace in auto loader (#7307) 2025-03-12 13:55:47 -06:00
base2n.php Create base2n.php 2023-04-23 01:05:46 -06:00
button.php Allow namespace in auto loader (#7307) 2025-03-12 13:55:47 -06: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 Allow namespace in auto loader (#7307) 2025-03-12 13:55:47 -06:00
directory.php Fix temporary permissions 2024-11-29 13:57:01 -07:00
domains.php Allow namespace in auto loader (#7307) 2025-03-12 13:55:47 -06:00
email.php Allow namespace in auto loader (#7307) 2025-03-12 13:55:47 -06: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 Allow namespace in auto loader (#7307) 2025-03-12 13:55:47 -06:00
logging.php Update logging class (#6829) 2023-11-13 18:55:52 -07:00
menu.php Allow namespace in auto loader (#7307) 2025-03-12 13:55:47 -06:00
message.php Allow namespace in auto loader (#7307) 2025-03-12 13:55:47 -06:00
modal.php Allow namespace in auto loader (#7307) 2025-03-12 13:55:47 -06: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 Allow namespace in auto loader (#7307) 2025-03-12 13:55:47 -06: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 Allow namespace in auto loader (#7307) 2025-03-12 13:55:47 -06:00
template.php Allow namespace in auto loader (#7307) 2025-03-12 13:55:47 -06: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 Allow namespace in auto loader (#7307) 2025-03-12 13:55:47 -06: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 Allow namespace in auto loader (#7307) 2025-03-12 13:55:47 -06:00