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

How to get User object in Doctrine event subscriber in Zend Expressive

Based on https://github.com/DamienHarper/DoctrineAuditBundle I'm trying to develop audit module for my Zend Expressive application. But I don't know how to get the User data (id) within audit logic. I see that $user is passed as request attribute in…
Pawel
  • 466
  • 1
  • 7
  • 20
0
votes
1 answer

Route parameter not working in zend-expressive

I just want to make a crud api over an "Event" object. Routes for index works well but the route for an specific event doesn't work as expected this is what I have in 'routes.php' $app->get('/event/:id', \App\Handler\EventRecoverHandler::class,…
ricky
  • 105
  • 1
  • 6
0
votes
1 answer

Zend Expressive not passing variables to view script

I am using Zend Expressive 2 due to PHP version constraints. If I return variables in step one of pipeline (IndexAction) the variables appear just fine. If I delegate to the next step (VerifyInputAction) and determine there is an error in the…
0
votes
1 answer

Why my Zend-HAL implementation is not working with protected values

I am new in Zend framework, and trying to use HAL for API response generation. In the following is a simpler situation of my issues. The class: class Version { protected $data; public function __construct($ar){ $data = $ar; } …
Md Monjur Ul Hasan
  • 1,705
  • 1
  • 13
  • 36
0
votes
1 answer

How to add new layout for admin dashboard

In Zend Expressive, the layout is "default" into "templates" folder. I would like to add "admin" folder into "templates" folder like…
kentuckyss
  • 101
  • 1
  • 10
0
votes
1 answer

Zend Expressive API does not return contents of objects

I'm creating a small API, mostly for learning purposes, but, I might implement it into a project I'm working on. So far, I have installed the zend expressive skeleton application and set up my models and entities. I'm able to query the database and…
0
votes
1 answer

How to get the base url Programatically in zend expressive?

I am working on an API application that will be run in different domains: http://example.com/, http://sub.example.com/, http://example-another.com/. Part of the API responses needs to send out its base_url. So I am trying to find a way to…
Md Monjur Ul Hasan
  • 1,705
  • 1
  • 13
  • 36
0
votes
2 answers

Why ths php dynamic object class creation is not working?

I am trying to create a class (working as factory class) in my Zend Expressive APP as follows: declare(strict_types=1); namespace App\Install\Factory; use App\Install\Model as Models; use App\Install\Abstracts\AttributeInterface; class…
0
votes
1 answer

How to set an user value in BlameableListener in a Zend Expressive application context?

How can I set an user value on Gedmo\Blameable\BlameableListener in a Zend Expressive application? The event subscribers are successfully added to the EventManager (see configuration file). The TimestampableListener is working as…
arueckauer
  • 349
  • 5
  • 19
0
votes
1 answer

Zend Expressive Route with optional parameter

I want use a route to get the complete collection and, if available, a filtered collection. so my route: $app->get("/companies", \App\Handler\CompanyPageHandler::class, 'companies'); My Handler for this route: use App\Entity\Company; use…
rob
  • 2,136
  • 8
  • 29
  • 37
0
votes
0 answers

How can I group identical middleware in zend-expressive?

I have 2 groups of routes (web and api): Here is an web routes example: return function (Application $app, MiddlewareFactory $factory, ContainerInterface $container): void { $app->get('/', [ …
Nepster
  • 144
  • 6
0
votes
1 answer

What is Container for zend-expressive symfony console command

I'm currently trying to integrate this library https://www.xtreamwayz.com/blog/2016-02-07-zend-expressive-console-cli-commands It seems it requires $container = require __DIR__ . '/config/container.php'; Can anyone help me out which file it needs…
Ali Rasheed
  • 2,765
  • 2
  • 18
  • 31
0
votes
2 answers

How can I get a request and session in the container?

I learn zend expressive and I have some questions about factories. So, I can get a session in middleware: ... /** @var Zend\Expressive\Session\LazySession $session */ $session =…
Nepster
  • 144
  • 6
0
votes
1 answer

Bypass digest authentication middleware (zend expressive)?

So I'm working on an api that uses digest authentication middleware. If a particular parameter is present in the request I want to be able to completely bypass authentication. public function process(ServerRequestInterface $request,…
Donal.Lynch.Msc
  • 3,365
  • 12
  • 48
  • 78
0
votes
0 answers

Using only php to decrypt zend-crypt hybrid

I'm developing an API that to return sensitive data will require a sort of handshake, which will return a public key for the client to encrypt the information before sending it to the API. For the API I am using expressive zend and to perform the…
1 2 3
8 9