2 namespace Consolidation\AnnotatedCommand;
5 * Command cration listeners can be added to the annotation
6 * command factory. These will be notified whenever a new
7 * commandfile is provided to the factory. This is useful for
8 * initializing new commandfile objects.
10 * @see AnnotatedCommandFactory::addListener()
12 class CommandCreationListener implements CommandCreationListenerInterface
16 public function __construct($listener)
18 $this->listener = $listener;
21 public function notifyCommandFileAdded($command)
23 call_user_func($this->listener, $command);