Commit Graph

22694 Commits

Author SHA1 Message Date
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
Tim Fry 58518d4e9d remove closing tag 2025-03-12 14:56:34 -03:00
Tim Fry ded64dd069 remove closing tag 2025-03-12 14:56:28 -03:00
Tim Fry 4eb174acfc remove invalid method params 2025-03-12 14:53:51 -03:00
Tim Fry d130289b9f remove closing tag 2025-03-12 14:53:16 -03:00
Tim Fry 7fb1affa48 remove include statement of class file 2025-03-12 13:08:36 -03:00
Tim Fry 74bc190450 remove include statement of class file 2025-03-12 13:08:02 -03:00
Tim Fry 57fe0bf80b remove include statement of class file 2025-03-12 11:59:41 -03:00
Tim Fry 837b27052f remove include statement of class file 2025-03-12 11:59:39 -03:00
Tim Fry 965ce636a8 remove include statement of class file 2025-03-12 11:59:37 -03:00
Tim Fry db88c0f7bc remove include statement of class file 2025-03-12 11:59:35 -03:00
Tim Fry 57145739d6 remove include statement of class file 2025-03-12 11:59:34 -03:00
Tim Fry 8bf3b65ec6 remove include statement of class file 2025-03-12 11:59:30 -03:00
Tim Fry 7f426a89f9 remove include statement of class file 2025-03-12 11:59:26 -03:00
Tim Fry 8125031f99 remove include statement of class file 2025-03-12 11:59:25 -03:00
Tim Fry c61302d263 remove include statement of class file 2025-03-12 11:59:23 -03:00
Tim Fry 06a40841f4 remove include statement of class file 2025-03-12 11:59:21 -03:00
Tim Fry d105ec4a07 remove include statement of class file 2025-03-12 11:59:19 -03:00
Tim Fry 2234a4fd26 remove include statement of class file 2025-03-12 11:59:17 -03:00
Tim Fry f2912d378d remove include statement of class file 2025-03-12 11:59:15 -03:00
Tim Fry 47c6f9ac04 remove include statement of class file 2025-03-12 11:59:11 -03:00
Tim Fry b287cececc remove include statement of class file 2025-03-12 11:59:08 -03:00
Tim Fry 4797067205 remove include statement of class file 2025-03-12 11:59:02 -03:00
Tim Fry 1044efefdc remove include statement of class file 2025-03-12 11:58:52 -03:00
Tim Fry 792f61262b remove include statement of class file 2025-03-12 11:58:08 -03:00
Tim Fry f61c692a79 remove include statement of class file 2025-03-12 11:57:56 -03:00
Tim Fry 0b54981637 remove include statement of class file 2025-03-12 11:57:09 -03:00
Tim Fry 89827df9fc remove include statement of class file 2025-03-12 11:57:07 -03:00
Tim Fry 151af1aa4b remove include statement of class file 2025-03-12 11:57:05 -03:00
Tim Fry 635137bfd3 remove include statement of class file 2025-03-12 11:57:03 -03:00
Tim Fry 74d2b5d1b2 remove include statement of class file 2025-03-12 11:57:01 -03:00
Tim Fry 3cb65f614f remove include statement of class file 2025-03-12 11:56:58 -03:00
Tim Fry 6c29cf3836 remove include statement of class file 2025-03-12 11:56:53 -03:00
Tim Fry 5b8b0e41ec remove include statement of class file 2025-03-12 11:56:50 -03:00
Tim Fry 377d7be8e6 remove include statement of class file 2025-03-12 11:56:46 -03:00
Tim Fry 91f0619728 remove include statement of class file 2025-03-12 11:56:41 -03:00
Tim Fry fd54b0e241 remove include statement of class file 2025-03-12 11:56:34 -03:00
Tim Fry 8239b8decc remove include statement of class file 2025-03-12 11:32:25 -03:00
Tim Fry 1693f40d25 remove include statement of class file 2025-03-12 11:32:17 -03:00
Tim Fry beef444960 remove include statement of class file 2025-03-12 11:32:07 -03:00
Tim Fry 26985ff253 remove include statement of class file 2025-03-12 11:31:51 -03:00
Tim Fry d4bdc0eea7 remove include statement of class file 2025-03-12 11:31:39 -03:00
Tim Fry 8f4c018ba9 remove include statement of class file 2025-03-12 11:31:29 -03:00
Tim Fry 009fe47961 remove include statement of class file 2025-03-12 11:31:10 -03:00
Tim Fry e62a7e1c12 remove include statement of class file 2025-03-12 11:30:37 -03:00
Tim Fry 3833267bbc remove include statement of class file 2025-03-12 11:30:13 -03:00
Tim Fry f1ade91ad1 remove include statement of class file 2025-03-12 11:29:10 -03:00
Tim Fry 6e86847921 remove include statement of class file 2025-03-12 11:28:56 -03:00
Tim Fry c03e133400 remove include statement of class file 2025-03-12 11:28:41 -03:00
Tim Fry 4ee03f1c89 remove include statement of class file 2025-03-12 11:28:30 -03:00