JohnD Posted June 30, 2014 Share Posted June 30, 2014 Page 211: [Tip] PHP allows you to more quickly reference namespaces...use keyword: Book says (incorrect): use MyNameSpace\Company; Should be (corrected): use MyNameSpace\Company\Department; use MyNameSpace\Company\Employee; All class names used must be included at the end of the namespace. 1 Link to comment Share on other sites More sharing options...
Antonio Conte Posted July 2, 2014 Share Posted July 2, 2014 Not totally true. Department\Class and Employee\Class is then working namespaces. You don't NEED to specify the full namespace. Link to comment Share on other sites More sharing options...
JohnD Posted July 2, 2014 Author Share Posted July 2, 2014 This is the only way I could get it to work. I tried it both ways. Maybe it's just my PHP v5.3? Link to comment Share on other sites More sharing options...
Anthony Posted September 7, 2015 Share Posted September 7, 2015 This is the only way I could get it to work. I tried it both ways. Maybe it's just my PHP v5.3? Thanks JohnD, I ran into the same problem which I posted and then ran into this thread. Your solution worked, I'm not sure what Antonio is referring to. I am using PHP 5.5. Link to comment Share on other sites More sharing options...
Recommended Posts