Exemplo n.º 1
0
 /**
  * {@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;
 }
Exemplo n.º 2
0
 /**
  * {@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);
 }
Exemplo n.º 3
0
 public function __toString() : string
 {
     return Ground::debugText($this->text) . Ground::debugText(VariableInspector::arrayInfo($this->parameters));
 }
Exemplo n.º 4
0
 public function __toString() : string
 {
     return Ground::debugText(sprintf(static::MASK_TO_STRING, get_class($this), $this->position, $this->count()));
 }