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
18
votes
2 answers

How to create ZF3 console application

In Zend Framework 2 it's very simple to add the initial module banner to the console applications. All we need to is to implement the getConsoleBanner and getConsoleUsage methods and implement the…
kachar
  • 2,310
  • 30
  • 32
9
votes
2 answers

How can I migrate Zend Framework 1 to 3

Has anyone please describe how much architecture changed by Zend from Ver 1 to 3. Recently zend released ZF3 but no information provide how to migrate from zf1 to zf3. I have an application was developed in zf1, now looking for upgrade it to using…
Dheeraj
  • 109
  • 1
  • 1
  • 4
5
votes
3 answers

ZF3 redirection after ACL authorization failed

I have a new ZF3 application with ACL. Now I need, in case of unauthorized access, to redirect to an error page (403 for example). I think the best way is to fire an event, then catch it, but I failed... All is in my User module, in Module.php…
Al Foиce ѫ
  • 4,195
  • 12
  • 39
  • 49
5
votes
3 answers

ZF3 zend-mvc-skeleton internationalization not working

I'm trying to evaluate if it's already the right time to start moving to ZF3 (or keep developing my application with ZF2). Therefore, I installed the mvc-skeleton application and walked through the MVC tutorial (here) which worked perfectly until I…
l_r
  • 1,060
  • 12
  • 23
4
votes
1 answer

Best way to build RESTful services using Zend Framework 3

We are starting a new project that will make use of RESTful services to talk to web clients (AngularJS) and mobile platforms (Android and iOS). The idea is to hide the bussiness logic inside the RESTful services and to use the same code for both web…
Mendes
  • 17,489
  • 35
  • 150
  • 263
4
votes
1 answer

Doctrine inheritance for entities common fields

I'm using Zend Framework 3 and Doctrine ORM for my web project. I have several modules in my application (User, Stock, Sales) and some entity models on each Module: User module entities: User, Account, etc.. Stock module entities: SKU, StockLevel,…
Mendes
  • 17,489
  • 35
  • 150
  • 263
4
votes
2 answers

The valid pattern for ZF3 service DI for interconnected services

As far as I understand the valid pattern is: a FooControllerFactory that instantiates the needed service(s) (FooService) a FooController with constructor __construct(FooService $fooService) the Controller acquires some basic data and gets a result…
Jan M.
  • 127
  • 2
  • 14
3
votes
1 answer

zf3 onRoute event listener

I have a piece of code in my model: public function init(ModuleManager $manager) { // Get event manager. $eventManager = $manager->getEventManager(); $sharedEventManager = $eventManager->getSharedManager(); // Register the event…
fajnalowiec
  • 147
  • 9
3
votes
1 answer

How add cookie using Zend Framework 3?

I need send a cookie to browser using Zend Framework 3. My code follows below, but it doesn't work: $cookie = new Zend\Http\Header\SetCookie('CookieKey', $val, $time, '/', ''); $response->getHeaders()->addHeader($cookie); How is the right way to…
Silas
  • 33
  • 8
3
votes
1 answer

zf3 zend navigation helper

I'm trying to implement my zend navigation from a container in ZF3. I have successfully created navigation with this quick start tutorial introducing navigation directly in config/autoload/global.php or config/module.config.php…
jairusgr
  • 137
  • 2
  • 9
3
votes
1 answer

Using OAuth2 and ZF3-MVC to protect REST API

I'm trying to get https://github.com/zfcampus/zf-oauth2 working with my ZF3-MVC Application (ok, one solution could be to wait Apigility update). I have successfully implemented the oauth2-server-php (https://github.com/bshaffer/oauth2-server-php),…
l_r
  • 1,060
  • 12
  • 23
2
votes
1 answer

Getting value from input select Zend Framework 3

how I can get value from input select in ZF3? $education = $form->get('education'); $education->setValueOptions([ '1' =>'option 1', '2' => 'option 2', ]); returns integer value 1,2, not 'option 1' or 'option 2' Even if I remove index and…
bielu000
  • 1,826
  • 3
  • 21
  • 45
2
votes
2 answers

fllashMessenger() not found in controller says phpStorm but is working

I'm getting an error in phpStorm in the ZF3 controller classes with the message: Method 'flashMessenger' not found in ...Controller At the same time it is working like a charm. But I would like this IDE not found error to be removed anyway. The…
Floris
  • 2,727
  • 2
  • 27
  • 47
2
votes
3 answers

ZF2 using PHP5 vs PHP7

I have a problem with my custom class located in: module/SomeModule/src/SomeModule/Model/someClass.php I get a database adapter like this using the ServiceLocator (exactly as in this Learning Zend Framework 2 tutorial): public function…
user3130983
  • 31
  • 1
  • 5
2
votes
4 answers

Creating new module ZF3 with ZendSkeletonModule

I created a new module through git using ZendSkeletonModule: git clone git://github.com/zendframework/ZendSkeletonModule.git Users and did the modifications according the new module name. But, even so it's not working and I'm getting 404 error…
Cassio
  • 21
  • 1
  • 3
1
2 3 4