Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Laminas Mvc Laravel Package

laminas/laminas-mvc

Laminas MVC is a modular, event-driven MVC framework for PHP applications. It provides routing, controllers, view integration, dependency injection, and configuration management, helping you build scalable, maintainable web apps and APIs on top of Laminas components.

View on GitHub
Deep Wiki
Context7

The SendResponse Event

laminas-mvc defines and utilizes a custom Laminas\EventManager\Event for updating the response object prior to emitting it, Laminas\Mvc\ResponseSender\SendResponseEvent. The event allows listeners to set response headers and content.

The methods it defines are:

  • setResponse($response)
  • getResponse()
  • setContentSent()
  • contentSent()
  • setHeadersSent()
  • headersSent()

Listeners

Currently, three listeners are listening to this event at different priorities based on which listener is used most.

Class Priority Method Called Description
Laminas\Mvc\SendResponseListener\PhpEnvironmentResponseSender -1000 __invoke This is used in HTTP contexts (this is the most often used).
Laminas\Mvc\SendResponseListener\ConsoleResponseSender -2000 __invoke This is used in console contexts.
Laminas\Mvc\SendResponseListener\SimpleStreamResponseSender -3000 __invoke This is used in HTTP context to pass through stream directly to output.

Because each listener has negative priority, adding your own logic to modify the Response involves adding a new listener without priority (as priority defaults to 1); thus, your own listener will execute before any of the defaults.

Triggered By

This event is executed when the MvcEvent::FINISH event is triggered, with a priority of -10000.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport
twbs/bootstrap4
php-http/client-implementation
phpcr/phpcr-implementation
cucumber/gherkin-monorepo
haydenpierce/class-finder
psr/simple-cache-implementation