Commit Graph

23 Commits

Author SHA1 Message Date
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
fusionate 61bc6c2b5b
Bridges [Class]: Updates for PHP 8.1 2023-05-19 23:48:01 +00:00
frytimo 69bd42af05
remove unneeded destruct methods as GC has higher performance (#6631)
Co-authored-by: Tim Fry <tim@voipstratus.com>
2023-04-27 20:18:53 -06:00
fusionate c67c8cd4c2 Destination Select - Dynamic: Clear session array on add/toggle/delete of a destination type record. 2020-11-30 14:15:57 -07:00
Nate e22c032d92 Update bridges.php 2019-12-03 16:51:45 -07:00
Nate a6b06ee8a9 Call Forward/Follow Me/DND: Update classes. 2019-11-30 21:42:15 -07:00
FusionPBX 34adf14ed9 Update bridges.php 2019-11-30 13:41:25 -07:00
Nate bf5cb9c1a7 Minor class mods, Conference Centers list view updates. 2019-11-02 13:40:17 -06:00
Nate b27410c600 Follow Me, Call Forward, DND: List view updates. 2019-10-29 20:18:51 -06:00
Nate 243b6b4e8c Access Controls, Bridges, Call Block, Call Flows: Class toggle method adjustments. 2019-10-29 10:11:18 -06:00
Nate 0c584db194 Minor mods to Access Controls, Bridges, Call Block and Call Broadcast lists and classes. 2019-10-25 19:40:28 -06:00
Nate 22ec9cd469 Update Access Controls, Bridges, Call Block, Call Broadcast classes. 2019-10-21 17:13:21 -06:00
Nate 17ac712cc8 Updates to Access Controls, Bridges, and Call Block. 2019-10-21 17:03:59 -06:00
Nate 3e1c19640b Update Bridges list page. 2019-10-19 16:57:41 -06:00
Nate 5dd179d2c4 Update bridge_edit.php 2019-10-19 10:07:18 -06:00
FusionPBX b38eb01980 Update bridges.php 2019-10-19 09:07:07 -06:00
Nate 1727e3ed3b Update bridge toggle message. 2019-10-12 01:20:36 -06:00
Nate d5264be977 Bridges: Integrate Action Bar, delete on edit. 2019-10-07 18:31:11 -06:00
FusionPBX b86a89829a Update bridges.php 2019-09-19 08:59:00 -06:00
FusionPBX 846fc3db83 Update bridges.php 2019-09-19 08:50:37 -06:00
Nate 0441e94b9c Update bridges.php 2019-08-28 21:16:15 -06:00
FusionPBX 41ce051534 Update bridges.php 2019-08-28 20:59:42 -06:00
FusionPBX 0a178cd2f1 Create bridges.php 2018-03-18 21:05:08 -06:00