Timeline for Recursive autoloader to find PHP files
Current License: CC BY-SA 3.0
13 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jun 10, 2020 at 13:24 | history | edited | CommunityBot |
Commonmark migration
|
|
Mar 18, 2017 at 0:35 | comment | added | fuxia | @MikeiLL Yes, absolutely correct. :) | |
Mar 18, 2017 at 0:32 | comment | added | MikeiLL |
@toscho thanks. i wasn't clear. If i wanted two namespace levels like MyName\CodeReview , then there would need to be a /src/codereview directory? And it would not need to be uppercase, right?
|
|
Mar 18, 2017 at 0:02 | comment | added | fuxia |
@MikeiLL No, you can just map Myname to the src directory.
|
|
Mar 17, 2017 at 19:22 | comment | added | MikeiLL |
Thanks for this @toscho. Am I seeing correctly that—with this Autoloader—if I want to say, have a top level namespace in the src file like MyName , I would need to have those files (MyName\ClassName , MyName\AnotherClass ) within a MyName sub-directory of src ?
|
|
Dec 28, 2016 at 1:30 | history | edited | fuxia | CC BY-SA 3.0 |
Fixed grammar and sample class name.
|
Dec 22, 2016 at 14:49 | comment | added | fuxia | @Name The file name should match the class name. See PSR 4, a standard that is widely accepted nowadays. The implementation above follows that standard. | |
Dec 22, 2016 at 12:28 | comment | added | Name |
@toscho- I have been using it now and it works great. Just one notice with this is that file names have to start with captial letters, ex. ViewEng.php . So far my files have started with lower case. Should filenames start with capital letters or should I upgrade this autoloader to find files starting with lower case?
|
|
Dec 20, 2016 at 17:27 | history | edited | fuxia | CC BY-SA 3.0 |
added 446 characters in body
|
Dec 20, 2016 at 17:22 | comment | added | Name | @toscho- As I have never used namespaces before, can you please give me a small example how to use them so that this autoloader can find my classes. | |
Dec 20, 2016 at 17:17 | comment | added | Name | @toscho- As it turns out, my own autoloader is not functioning as I intended it to work. It seems when spreading code between more folders than I originally tested, it just can't find those classes. Thank you for your comments and help! | |
Dec 20, 2016 at 17:15 | vote | accept | Name | ||
Dec 19, 2016 at 16:08 | history | answered | fuxia | CC BY-SA 3.0 |