views:

32

answers:

1

Hi,

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 write both use and require_once?

Best regards, Sebastian

+1  A: 

You cannot autoload functions or namespaces, only classes.

Daniel Egeberg