I came across the __autoload function in PHP and would like to use it with my MVC folder structure. The function itsself is pretty easy, but how do I achieve a dynamic folder scanning after some kind of naming, please see example:
-application
--controller
--models
---entities
----house
---factories
----houseFactory
--views
-library
-public
As you maybe recognise its very close based on zend framework or other frameworks -as I come from those, however I would like to develop a website without framework and just started to write bootsrap file.
Maybe sombody could help me with the autoload in this - i think - advanced usage.
My Classnames will be like Model_Entities_House or Model_Factory_HouseFactory
witch can be applied to the folder structure.