PHP Namespaces help

Discussion in 'Scripts, 3rd Party Apps, and Programming' started by callumacrae, Feb 26, 2011.

  1. callumacrae

    callumacrae not alex mac Community Support

    Messages:
    5,257
    Likes Received:
    97
    Trophy 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:

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

    Anyone got any idea? Thanks :)

    ~Callum
     
  2. leafypiggy

    leafypiggy Manager of Pens and Office Supplies Staff Member

    Messages:
    3,819
    Likes Received:
    163
    Trophy Points:
    63
    No clue if it'll work, but try this:

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

    callumacrae not alex mac Community Support

    Messages:
    5,257
    Likes Received:
    97
    Trophy Points:
    48
    If you can't find a paintbrush, you wouldn't paint a picture with a screwdriver ;)

    ~Callum
     
  4. callumacrae

    callumacrae not alex mac Community Support

    Messages:
    5,257
    Likes Received:
    97
    Trophy 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
     

Share This Page