/** * @param string $matcher * * @return $this */ public static function matching($matcher) { if (is_string($matcher) != true) { throw new \InvalidArgumentException('A console action should have a URI pattern as matching term; received: ' . var_export($matcher, true)); } return parent::matching(new Command($matcher)); }
/** * @param \Somos\Action $action * @return bool */ private function isConsoleCommand(\Somos\Action $action) { return $action->getMatcher() instanceof Command; }
/** * Returns an example action object that can be used to populate the MessageBus with; no command is able to handle * this. * * @return Action */ private function givenAnExampleAction() { return Action::matches('/'); }