Esempio n. 1
0
 /**
  * {@inheritDoc}
  * @see \Fixin\Delivery\Cargo\CargoHandlerInterface::handle($cargo)
  */
 public function handle(CargoInterface $cargo) : CargoInterface
 {
     if ($cargo instanceof HttpCargoInterface) {
         if ($method = $this->getActionMethodName($cargo->getRequestParameters()->get(static::ACTION_PARAMETER, static::DEFAULT_ACTION))) {
             return $this->handleMethod($cargo, $method);
         }
         return $this->replyNotFound($cargo);
     }
     return $cargo;
 }