handler example

$this->request  = Services::request();
        $this->response = Services::response();

        // Get the first exception.         while ($prevException = $exception->getPrevious()) {
            $exception = $prevException;
        }

        if (method_exists($this->config, 'handler')) {
            // Use new ExceptionHandler             $handler = $this->config->handler($statusCode$exception);
            $handler->handle(
                $exception,
                $this->request,
                $this->response,
                $statusCode,
                $exitCode
            );

            return;
        }

        
PluginEvents::COMMAND => 'onCommand',
    ];
  }

  /** * Post command event callback. * * @param \Composer\Script\Event $event * The Composer event. */
  public function postCmd(Event $event) {
    $this->handler()->scaffold();
  }

  /** * Post package event behavior. * * @param \Composer\Installer\PackageEvent $event * Composer package event sent on install/update/remove. */
  public function postPackage(PackageEvent $event) {
    $this->handler()->onPostPackageEvent($event);
  }

  
Home | Imprint | This part of the site doesn't use cookies.