__construct() public method

Initializes the queue.
public __construct ( )
Ejemplo n.º 1
0
 /**
  *
  * @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']);
 }
Ejemplo n.º 3
0
 /**
  * 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;
 }
Ejemplo n.º 4
0
 /**
  * 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;
 }
Ejemplo n.º 5
0
 /**
  * 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 = [];
 }
Ejemplo n.º 6
0
 /**
  * Middleware constructor.
  */
 public function __construct()
 {
     parent::__construct();
     $this->forge = Forge::getInstance();
     $this->events = $this->forge->make(Events::class);
 }
Ejemplo n.º 7
0
 /**
  * Constructor
  *
  */
 public function __construct($finalHandlerOptions = [])
 {
     parent::__construct();
     $this->finalHandlerOptions = $finalHandlerOptions;
 }
Ejemplo n.º 8
0
 /**
  * Constructor.
  *
  * @param Negotiator $negotiator The configured negotiator.
  */
 public function __construct(Negotiator $negotiator)
 {
     $this->negotiator = $negotiator;
     parent::__construct();
 }