PHP Namespaces: Function Loading
I'd like to play a bit with functional programming in PHP. I think it's intersting to try out something different when always writing oop in php.
However, I'd like to use namespaces. My namespaces are equal to the file structure:
namespace my\Models\User;
/my/Models/User.php
Is their a way to do something like autoloading for this. That I want have to writ开发者_如何学JAVAe both use and require_once?
Best regards, Sebastian
You cannot autoload functions or namespaces, only classes.
精彩评论