开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜