zf3

zf3 zend navigation helper

一曲冷凌霜 提交于 2021-01-27 12:50:19
问题 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 files: https://docs.zendframework.com/zend-navigation/quick-start/ But now I need to make it work these with the helpers to allow navigation modifications from the controller, using the "Navigation setup used in examples" section: https://docs.zendframework.com/zend

Doctrine inheritance for entities common fields

[亡魂溺海] 提交于 2020-01-15 08:28:50
问题 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 , etc.. Sales module entities: Invoice , PaymentMethod , etc.. By default all entities has common fields, things like: creationDateTime : Date/time of creation creationUser : User who create the entity lastChangeDateTime : Date/time of last

zf3 onRoute event listener

£可爱£侵袭症+ 提交于 2020-01-04 13:44:10
问题 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 listener method. $sharedEventManager->attach(__NAMESPACE__, MvcEvent::EVENT_DISPATCH, [$this, 'myFunc'], 100); } // Event listener method. public function myFunc(MvcEvent $event) { echo 'it works!'; exit; } The listener is invoked. Although if I change event type to

Best way to build RESTful services using Zend Framework 3

时间秒杀一切 提交于 2019-12-22 08:05:21
问题 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 client and mobile platforms. Our server is being built in PHP using Zend Framework 3 (I´m new to the framework). The application will be have dozen of entities with hundreds of services. I´ve noted on the web that is seems that ZF2 has a REST

ZF3 zend-mvc-skeleton internationalization not working

自古美人都是妖i 提交于 2019-12-22 06:38:04
问题 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 got to the internationalization part. I installed the components (i.e. zend-i18n and zend-mvc-i18n component), created the translation files (i.e. en_US.mo and en_US.po) and copied them into my module/Application/language/ folder and added the

ZF3 redirection after ACL authorization failed

旧城冷巷雨未停 提交于 2019-12-12 11:26:36
问题 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 (extracts): namespace User; use Zend\Mvc\MvcEvent; use Zend\Permissions\Acl\Acl; use Zend\Stdlib\Response ; use Zend\View\Model\ViewModel; [...] class Module implements ConfigProviderInterface { [...] public function onBootstrap(MvcEvent $e) { // Set

is it possible to install doctrine orm module with ZF3 skeleton app?

北城以北 提交于 2019-12-12 04:23:53
问题 My knowledge of php composer is no more than basic, but... I've downloaded and installed the Zend Framework 3.0.0dev MVC skeleton app and wanted to find out if I could install the Doctrine ORM module along with it. composer require doctrine/doctrine-orm-module complains about Problem 1 - Installation request for doctrine/doctrine-orm-module ^0.10.0 -> satisfiable by doctrine/doctrine-orm-module[0.10.0]. - doctrine/doctrine-orm-module 0.10.0 requires zendframework/zend-mvc ~2.3 -> satisfiable

ZF3 MVC Zend\Authentication as a Service Factory

我的梦境 提交于 2019-12-11 06:35:55
问题 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 serviceLocator and ServiceAware are not available anymore I'm trying to create an AuthenticationServiceFactory but I do not succeed yet. Would you have any ideas on what I'm doing wrong and how I could do it with ZF3 ? Here is a simplified version of my

Best way to build RESTful services using Zend Framework 3

时光怂恿深爱的人放手 提交于 2019-12-05 12:32:50
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 client and mobile platforms. Our server is being built in PHP using Zend Framework 3 (I´m new to the framework). The application will be have dozen of entities with hundreds of services. I´ve noted on the web that is seems that ZF2 has a REST module, but I can´t find one for ZF3 (at least not in the documentation). Some questions I have: What is