zend-framework2

ZendSkeleton Issues

断了今生、忘了曾经 提交于 2019-12-11 08:42:26
问题 I have downloaded .zip for zendskeleton and it is having composer.phar and composer.json. when I run below given command in Git CLI from zendskeleton folder it gives some error. php composer.phar self-update Error: $ php composer.phar self-update [Composer\Downloader\TransportException] The "https://getcomposer.org/version" file could not be downloaded: failed to open stream: A connection attempt failed because the connected party did not properly respond after a period of time, or

ZFCUser and bjyauthorize - How to leave out authorization for landing page

雨燕双飞 提交于 2019-12-11 08:37:53
问题 I'm building a closed website which has a landing page for everyone. I'm using ZfcUser and BjyAuthorize. Everything works now but I wonder how I can exclude my Application's Application\Controller\Index::index action. In my module.bjyauthorize.global.php I told my action to require no authentication: 'BjyAuthorize\Guard\Controller' => array( array( 'controller' => 'Application\Controller\Index', 'action' => 'index', 'roles' => array() ), // ... But still I get forwarded to the ZFCUser login

Can't get Logger service in ZF2

血红的双手。 提交于 2019-12-11 08:28:52
问题 I struggled the problem for days, but still don't find what's wrong with it. Here is my configuration segment in application.config.php: // Initial configuration with which to seed the ServiceManager. // Should be compatible with Zend\ServiceManager\Config. 'service_manager' => array( 'abstract_factories' => array( 'Zend\Log\LoggerAbstractServiceFactory', 'Zend\Cache\Service\StorageCacheAbstractServiceFactory', ) ), 'log' => array( 'Log\App' => array( 'writers' => array( array( 'name' =>

How to use zend delete action in confirmation popup?

萝らか妹 提交于 2019-12-11 08:24:58
问题 I want to use a confirmation popup to delete my items, so this is my delete action : public function deleteAction() { $id = (int) $this->params()->fromRoute('id', 0); $article = $this->getObjectManager()->find('\Application\Entity\Article', $id); if ($this->zfcUserAuthentication()->hasIdentity()) { if ($this->request->isPost()) { $this->getObjectManager()->remove($article); $this->getObjectManager()->flush(); return $this->redirect()->toRoute('blog'); } } else { return $this->redirect()-

composer autoload not working on production server

◇◆丶佛笑我妖孽 提交于 2019-12-11 07:57:02
问题 I've setup a project localy using composer to autoload my vendors and modules. This is done on a Windows XP machine running Nginx. When I sync everything to my production server, running LAMP, the autoloader stops working and every class i call its not found. Since this is a shared host i cant run composer.phar update to try to refresh the classmap namespace. Anyone knows what might be happening? +INFO: <?php // autoload_namespaces.php generated by Composer $vendorDir = dirname(__DIR__);

Error: Credit card details has to be set explicitly or there has to be an action that supports ObtainCreditCard request

点点圈 提交于 2019-12-11 07:53:22
问题 I use Payum stable version 0.13 and Zend framework v2 for make payments via AuthorizeNet. My code for test: $storage = $this->getServiceLocator() ->get('payum') ->getStorage('LowbiddoPayment\Entity\AgreementDetails'); $details = $storage->create(); $details['currency'] = 'USD'; $details['amount'] = 100; $details['card_num'] = new SensitiveValue('4111111111111111'); $details['exp_date'] = new SensitiveValue('10/16'); $details['description'] = 'Test'; $storage->update($details); $this-

Why are my params not showing up in the url?

我们两清 提交于 2019-12-11 07:48:10
问题 Why are my action and params not showing up in my url? I am using the zend 2 framework. I have a search action and a results action. Below is my search action (not using variables as I test): return $this->forward()->dispatch('Application\Controller\Index', array( 'action' => 'results', 'zip' => '12345', )); The route is a child of my home route. 'results' => array( 'type' => 'segment', 'options' => array( 'route' => 'results[/:zip]', 'defaults' => array( 'controller' => 'Application

ZF2 Is there a shorter/cleaner way to get the TableGateway classes in a controller?

巧了我就是萌 提交于 2019-12-11 07:17:24
问题 Recently I made my first ZF2 application. I was walking through the code to see if I could make the code somewhat cleaner. Then I noticed that my controller classes have a huge block of code that supplies the controller of the TableGateway classes it needs. And I wondered is there a shorter/cleaner way to do this? It just seems silly that half of my controller class is dedicated to this simple task of fetching some TableGateWay classes. protected $appointmentTable; protected $customerTable;

Redirect css|js|img|fonts folder using .htaccess

两盒软妹~` 提交于 2019-12-11 07:01:24
问题 I'm on shared hosting where some website live. I have to move a ZendFramework2 on this server by adding it in a directory from the root (dir name = site). Controllers and actions are working right but I can't load any css, images or javascript. Here are my directories : /root/website1 (example.com/website1) /root/website2 (example.com/website2) /root/site (example.com/site) /root/site/application /root/site/data /root/site/library /root/site/public /root/site/public/css /root/site/public

composer.json for bjy-authorize, zfcUser and zfc-user-doctrine-orm in ZF2

北战南征 提交于 2019-12-11 06:59:50
问题 i am trying to use bjy-authorize, zfcUser and zfc-user-doctrine-orm in ZF2 using the composer. But i always get an error, when i call composer.phar update. the composer.json looks as follows: { "name": "zendframework/skeleton-application", "description": "Skeleton Application for ZF2", "license": "BSD-3-Clause", "keywords": [ "framework", "zf2" ], "homepage": "http://framework.zend.com/", "minimum-stability": "alpha", "require": { "php": ">=5.3.3", "zendframework/zendframework": "2.*",