/** * {@inheritDoc} * @see \Fixin\Delivery\Cargo\CargoHandlerInterface::handle($cargo) */ public function handle(CargoInterface $cargo) : CargoInterface { if ($cargo->getContent() instanceof \Throwable) { $cargo->setContent(Ground::debugText(htmlspecialchars($cargo->getContent())))->setContentType(static::CONTENT_TYPE); } return $cargo; }
/** * {@inheritDoc} * @see \Fixin\Resource\Factory\FactoryInterface::__invoke() * */ public function __invoke(array $options = null, string $name = null) { $factory = 'Delivery\\Cargo\\Factory\\' . (Ground::isConsole() ? 'ConsoleCargoFactory' : 'HttpCargoFactory'); return $this->container->clonePrototype($factory); }
public function __toString() : string { return Ground::debugText($this->text) . Ground::debugText(VariableInspector::arrayInfo($this->parameters)); }
public function __toString() : string { return Ground::debugText(sprintf(static::MASK_TO_STRING, get_class($this), $this->position, $this->count())); }