/** * @param QueryInterface $query * * @return Result|null */ public final function handle(QueryInterface $query) { $result = $this->process($query); if ($result === null && $this->successor !== null) { $result = $this->successor->handle($query); } return $result; }
/** * @param QueryInterface $query * * @return Result|null */ public function getResult(QueryInterface $query) { return $this->first->handle($query); }