Questions tagged as 'spl-autoloader-register'

1
answer

class_exists is running spl_autoloader_register

I created a simple script to automatically load classes using spl_autoload_register , but I noticed a strange behavior, when I use class_exists spl_autoload_register is executed, for example: <?php function autoLoadClass($na...
asked by 16.10.2015 / 20:41
1
answer

I can not load classes using spl_autoload_register

I'm trying to load a class that is in another folder in the core.php file and I'm not getting My browser reports this message    Fatal error: Uncaught Error: Class 'Core' not found in   /var/www/html/cursophp/superAdvanced/mvc/views/index....
asked by 18.05.2018 / 14:45
1
answer

How to list all namespaces from a specific one?

I need to instantiate a class by just passing its name and trying to instantiate it in several different nemapaces until I can. I have a class with a namespace, but I can not get the namespace to instantiate it, but the problem is that this clas...
asked by 16.04.2018 / 17:06
0
answers

Problem in Autoload PHP

I'm starting in POO and SPL and recently I faced the following problem: I have the following file that does all bootstrapping of my application init.php , and in it I do autoload of all classes from the lib /...
asked by 10.10.2017 / 16:57
0
answers

Problems optimizing login system with autoload

I did an optimization on the login system and as I had problems with directory I decided to search the web and found a legal resource of PHP that is autoload . I did the whole implementation according to the examples I got but I'm having prob...
asked by 16.05.2017 / 04:25