/** * * @param array $middlewares */ public function __construct($middlewares) { parent::__construct(); foreach ($middlewares as $middleware) { $this->pipe($middleware); } }
/** * @param AuthorizationServerInterface $authorizationServer */ public function __construct(AuthorizationServerInterface $authorizationServer) { parent::__construct(); $this->authorizationServer = $authorizationServer; $this->pipe('/authorize', [$this, 'handleAuthorizeRequest']); $this->pipe('/token', [$this, 'handleTokenRequest']); $this->pipe('/revoke', [$this, 'handleRevocationRequest']); }
/** * Constructor * * Calls on the parent constructor, and then uses the provided arguments * to set internal properties. * * @param Router\RouterInterface $router * @param null|ContainerInterface $container IoC container from which to pull services, if any. * @param null|callable $finalHandler Final handler to use when $out is not * provided on invocation. * @param null|EmitterInterface $emitter Emitter to use when `run()` is * invoked. */ public function __construct(Router\RouterInterface $router, ContainerInterface $container = null, callable $finalHandler = null, EmitterInterface $emitter = null) { parent::__construct(); $this->router = $router; $this->container = $container; $this->finalHandler = $finalHandler; $this->emitter = $emitter; }
/** * Creates a new {\bitExpert\Adroit\WebApplication}. * * @param EmitterInterface $emitter */ public function __construct(EmitterInterface $emitter = null) { parent::__construct(); if (null === $emitter) { $emitter = new SapiEmitter(); } $this->emitter = $emitter; }
/** * AdroitMiddleware constructor. * * @param string $routingResultAttribute * @param \bitExpert\Adroit\Action\Resolver\ActionResolver[] $actionResolvers * @param \bitExpert\Adroit\Responder\Resolver\ResponderResolver[] $responderResolvers */ public function __construct($routingResultAttribute, array $actionResolvers, array $responderResolvers) { parent::__construct(); $this->routingResultAttribute = $routingResultAttribute; $this->actionResolvers = $actionResolvers; $this->responderResolvers = $responderResolvers; $this->beforeActionResolverMiddlewares = []; $this->beforeActionExecutorMiddlewares = []; $this->beforeResponderResolverMiddlewares = []; $this->beforeResponderExecutorMiddlewares = []; }
/** * Middleware constructor. */ public function __construct() { parent::__construct(); $this->forge = Forge::getInstance(); $this->events = $this->forge->make(Events::class); }
/** * Constructor * */ public function __construct($finalHandlerOptions = []) { parent::__construct(); $this->finalHandlerOptions = $finalHandlerOptions; }
/** * Constructor. * * @param Negotiator $negotiator The configured negotiator. */ public function __construct(Negotiator $negotiator) { $this->negotiator = $negotiator; parent::__construct(); }