PHP Namespaces help

callumacrae

not alex mac
Community Support
Messages
5,257
Reaction score
97
Points
48
I suck at namespaces.

I'm trying to introduce namespaces into my framework (https://github.com/callumacrae/lynx-framework/), but I kinda suck at it and am getting a random error I can't get rid of:

Fatal error: Call to a member function login() on a non-object in /Applications/XAMPP/xamppfiles/htdocs/lynx-framework/lynx/apps/controllers/home.php on line 18

Minimalisied code of what I'm trying to do here: https://gist.github.com/845473

Anyone got any idea? Thanks :)

~Callum
 

leafypiggy

Manager of Pens and Office Supplies
Staff member
Messages
3,819
Reaction score
163
Points
63
No clue if it'll work, but try this:

$this->auth::login('somedata');
 

callumacrae

not alex mac
Community Support
Messages
5,257
Reaction score
97
Points
48
I got it working; line 24 of controller.php in the gist should have been $module_name and then $module_name on the next line, as it was messing up all the other variables.

Yeeeeaaaah I'm a nub

~Callum
 
Top