On Thu, Jan 20, 2011 at 5:33 PM, Tommy Pham <tommyhp2@xxxxxxxxx> wrote: > Hi folks, > > I thought I try implementing namesapce on one the ported apps I did a while > back but ran into a problem. First the code: > > //namespace org\puremvc\php\interfaces; > > interface ICommand > { > function execute(INotification $notification); > } > interface INotifier > { > function sendNotification($notificationName, $body = null, $type = > null); > } > > //-------------------------------------------------------------------------- > --- > //namespace org\puremvc\php\patterns\observer; > //use org\puremvc\php\interfaces\INotifier; > > class Notifier implements INotifier > { > public function __construct() { echo __METHOD__; } > public function sendNotification($notificationName, $body = null, $type > = null) > { > } > } > > //-------------------------------------------------------------------------- > --- > //namespace org\puremvc\php\patterns\command; > //use org\puremvc\php\interfaces\ICommand; > //use org\puremvc\php\interfaces\INotifier; > //use org\puremvc\php\patterns\observer\Notifier; > > class SimpleCommand extends Notifier implements ICommand, INotifier > { > public function __construct() { parent::__construct(); echo ' -> '; > echo __METHOD__; } > function execute(INotification $notification) { } > } > Where's the INotification namespace? If it's in org\puremvc\php\interfaces, you'll have to include it, too. I see you just included the whole set of interfaces in the top part of the example. Maybe you just omitted the code, but that could be the problem. Adam -- Nephtali: A simple, flexible, fast, and security-focused PHP framework http://nephtaliproject.com