Questions tagged [mezzio]

Mezzio is a web application and API framework written in PHP and using standards-based middleware.

Mezzio, formerly Expressive, is a web application and API framework written in PHP and using standards-based middleware. It consumes request handlers and middleware, using HTTP messages.

Mezzio is a sub-project of the project.

123 questions
0
votes
1 answer

Incomplete links generated in hal (zend-expressive-hal + zend-router)

My routes def: 'router' => [ 'routes' => [ 'TimeTable' => [ 'type' => 'Literal', 'options' => [ // Change this to something specific to your module 'route'…
neradp
  • 11
  • 2
0
votes
1 answer

Zend routing issue

I'm working on converting a (quite sloppily put together) zend expressive website to a zend framework 3 website for a local restaurant. When I set up the routing on the expressive website I would load a location based on a query parameter looking…
0
votes
0 answers

Zend expresive - pass parameters between handlers

I'm using Zend Expresive 3. I have two handles, one is for rendering login page: public function handle(ServerRequestInterface $request) : ResponseInterface { return new HtmlResponse($this->renderer->render('web::login-page')); } Second is for…
Robin71
  • 383
  • 5
  • 26
0
votes
2 answers

Using AbstractPluginManager with Zend Expressive 3

I'd like to inject an array of objects that implement a common interface into one of my services. I am using zend servicemanager as the DI container. I have been reading the docs for quite a bit now and it seems to me that AbstractPluginManager is…
Frank
  • 49
  • 7
0
votes
0 answers

In context of an MVC web application framework, where can I place multiple if/then/else-like directives that affect output?

I am using a PHP framework (transitioning from Zend Framework to Zend Expressive), and I have something like the following: I have a product that has various models and customizations, and depending on those, different things are to be displayed. …
Dennis
  • 7,907
  • 11
  • 65
  • 115
0
votes
0 answers

select crazy when setData in Zend Form

I have a problem with zend-form or Doctrine ORM, im not sure about it, the problem is i use zend-form and is ok but when i need to update has a problem, when i get old values end put in setData the select is crazy an set many option to selected. i…
0
votes
1 answer

How to test a zend expressive rest api controller using PHPUnit?

I'm trying to learn PHPUnit by testing a rest api controller built using zend expressive, but couldn't find any resources online regarding how to perform the same. The code in Official documentation for zend framework is not working for zend…
Sanju
  • 1,478
  • 2
  • 20
  • 41
0
votes
0 answers

How to validate uploaded images with zend-inputfilter

I have a form that accepts a text field and an image, and I would like to be able to validate or filter the images that are uploaded. I try to follow this tutorial on GitHub (https://github.com/lowtower/zend-expressive2-tutorial) I am using zend…
0
votes
1 answer

How to log PHP errors into PHP's error file in Zend Expressive?

Using Zend Expressive 2.0.5, I want to log PHP errors into the PHP's error log file itself, I went through https://docs.zendframework.com/zend-expressive/features/error-handling/#handling-exceptions-and-errors I also saw this post: Zend expressive -…
Ashish Ranjan
  • 12,760
  • 5
  • 27
  • 51
0
votes
1 answer

How use phly-expressive-oauth2clientauthentication module for zend-expressive

Hy, I would like to use this module (https://github.com/phly/phly-expressive-oauth2clientauthentication)in my expressive application. I read this documentation https://phly.github.io/phly-expressive-oauth2clientauthentication here is what I did :…
shishi
  • 28
  • 4
0
votes
1 answer

relationship of different tables in Zend\Db\TableGateway\TableGateway on Zend Expressive 2

I try to follow this tutorial on GitHub (https://github.com/lowtower/zend-expressive2-tutorial) I understand everything (I think) but I wonder, what happens if I need to relate different tables using the TableGateway interface? Taking the…
0
votes
1 answer

Zend expressive - Layout

In my layout (Twig), i'd like to retrieve a value from a Middleware authentication. If i put, in templates.global.pĥp: 'twig' => [ 'globals' => [ // Variables to pass to all twig templates 'auth' => (new…
Flo
  • 1
  • 1
0
votes
1 answer

Get current route name in the view in Zend Expressive?

I'm trying to get the current route name to be able to do some logic in the view. I need to retrieve this inside the view, not in the controller. For example, in laravel if I wanted to test for a route I would use Request::is('admin/dashboard') or…
nullwriter
  • 785
  • 9
  • 34
0
votes
1 answer

Is it possible to pipe a middleware using Zend Servicemanager?

I am using Zend Expressive as an API. I have succeeded adding a middleware, which validates the request headers of API Keys, for every single request. At the moment I add the middleware using the pipe() function in…
Kilise
  • 1,051
  • 4
  • 15
  • 35
0
votes
1 answer

How to pass a Request to Controller through middleware Zend Framework 3

I'm developing a REST API with ZendFramework 3 components. I decided to validate (Authenticate) every request using a middleware and if the request is valid then pass to an ordinary controller action to retrieve resources and send the response…
1 2 3
8 9