Questions tagged [zf3]

Zend Framework 3 is a 5.6+ MVC framework and component library.

Zend Framework 3 is an initiative encompassing a number of strategies and projects. Official release statement

Release Date : 28June2016

The main component of Zend Framework 3 remains the MVC components, which now is composed of many separeted components. This allows more code reuse and independent development cycles among the various components. Also many performance improvements were made with respect to the previous version of the framework.

The main news of the framework appearing in this version is Expressive, a microframework for building PSR-7 middleware applications based on the new PSR-7 specification, which abstracts HTTP messages.

59 questions
1
vote
2 answers

Doctrine EntityManager in ZF3 controller

Please, help me to solve the following problem in ZendFramework. I'm new in ZF and PHP7. For a few days I havent been able to use Doctrine EntityManager in controller. I have: My Controller namespace Sonun\Controller; use…
Baisar
  • 11
  • 1
  • 3
1
vote
2 answers

ZF3 MVC Zend\Authentication as a Service Factory

I'm trying to adapt my ZF2 User module to ZF3 MVC. It has an authentication service manager that is called in the onBootsrap function inside the Module class for every request (i.e. page loading) to check if the user is authenticated. As…
l_r
  • 1,060
  • 12
  • 23
1
vote
2 answers

ZF3: set terminal / render view without layout (Zend-Expressive)

I have installed the skelleton app from ZF3 'zend-expressive'. In the routing config I have configured a few routes. Some of these routes should return a response without the layout. In ZF2 I simply used the ViewModel on which you could call…
Nykac
  • 129
  • 2
  • 7
0
votes
1 answer

zf3 change locale depending on user selection

I have Zend Framework 3 Application with working translator using po files. I have configured it like this in my \config\global.php file: 'translator' => [ 'locale' => 'en_US', 'translation_file_patterns' => [ [ 'type' …
0
votes
2 answers

ZF3 controller not found in module.php

I am very new in Zend Fw 3. I followed https://docs.zendframework.com/tutorials/ I added the controller config in module.php public function getControllerConfig(){ return[ 'factories' = >[ Controller\DocumentController::class…
0
votes
1 answer

Zend Framework 3 stylesheet in partials

I have a little problem with my partials in zf3, trying to add css in partial it doesn't work anymore as in zf2, this is my code: headLink()->prependStylesheet($this->serverUrl() . '/path/to/css_file.css');?> If anyone has any…
0
votes
0 answers

doctrine module Command Line Tool

I'd like to use Commandline Tool with doctrine-module, following the Oleg Krivtsov's book Using Zend Framework 3, chapter 13.4 (about migrations). I work on windows 10 with Xampp. here is a copy of my cli windows D:\xampp\php>php…
0
votes
1 answer

ZF2/ZF3 hydrate object and nested objects from single query

Suppose I have a query that returns the following data: RangeId | MinValue | MaxValue | Resolution | UnitId | UnitName I want to hydrate the object MeasurementRange with the above data. class MeasurementRange { public function getRangeId()…
Dima Dz
  • 512
  • 1
  • 5
  • 17
0
votes
1 answer

Comments for documentation PHP post data and returning JSON

I have two questions actually: For some functions I am posting forms to them, can I mention them as @params in comments or what: /* some descriptions * * @param string userName */ public function add(){ $userName =…
Waqar Haider
  • 929
  • 10
  • 33
0
votes
1 answer

Migration of zf2 to zf3

I have some issues regarding the zf2 to zf3 migration of my application. I've gone through the migration guides and started the migration process as describe there. According to the migration guide, there is no serviceLocator available into…
chamindaindika
  • 455
  • 3
  • 15
0
votes
1 answer

Using DoctrineModule UniqueObject validator annotation in ZF3 app?

I am trying to use the DoctrineModule's UniqueObject validator annotation in an entity with Zend\Form (ZF3) but am unable to do so. Annotation in entity: * @Annotation\Validator({"name":"DoctrineModule\Validator\UniqueObject"}) Controller method…
Non
  • 1
  • 1
0
votes
1 answer

Zf3 Zfcuser redirect param does not work

Zfcuser provide an option to redirect to specified route with query param "redirect" like that: /user/login?redirect=/en/about Zfcuser 1.* version on ZF2 works perfectly. But recently I migrate to ZF3 and Zfcuser 2.0.0 version and noticed that this…
Ivo
  • 353
  • 2
  • 13
0
votes
1 answer

Access local parameters from module services and controllers

I´m developing a site based on Zend Framework 3 and in some modules I need to send e-mails. I´m using PERL Mail to do so. It willwill foward all e-mail send requests to Amazon SES service on production, and for development I´m using a free gmail…
Mendes
  • 17,489
  • 35
  • 150
  • 263
0
votes
1 answer

ZF3 redirect to another controller acton in another module

I´m using ZF3 with the Applcation and User modules. The Application module is the default loaded module that contains my index page as a welcome page with no login information. The User module has the login page and all the user authentication…
Mendes
  • 17,489
  • 35
  • 150
  • 263
0
votes
1 answer

No commands defined in the doctrine "mapping" namespace (doctrine-module mapping:import)

I´m trying to import a database to start a ZF3 PHP project using Doctrine. I´ve read this tutorial on how to create entities from the database and issued the following command: $ cd myproject $ ./vendor/bin/doctrine-module mapping:import And got…
Mendes
  • 17,489
  • 35
  • 150
  • 263