Futurescale, Inc. PureMVC Home

The PureMVC Framework Code at the Speed of Thought


Over 10 years of community discussion and knowledge are maintained here as a read-only archive.

New discussions should be taken up in issues on the appropriate projects at https://github.com/PureMVC

Pages: [1]
Print
Author Topic: [ FIXED ] - Error in Controller  (Read 3842 times)
hasan
Moderator
Newbie
*****
Posts: 8



View Profile WWW Email
« on: February 02, 2009, 03:11:50 »

Fixed executeCommand() to now include a conditional clause that determines the existence of the INotification to Command mapping before attempting command execution...

if (isset($this->commandMap[ $note->getName() ]))
{
   $commandClassName = $this->commandMap[ $note->getName() ];
   $commandClassReflector = new ReflectionClass( $commandClassName );
   
   $commandClassRef = $commandClassReflector->newInstance();
   $commandClassRef->execute( $note );
}

Logged

P E A C E

Hasan
Pages: [1]
Print