zend-framework

Zend\ServiceManager\ServiceManager::get was unable to fetch or create an instance for getAlbumTable

心已入冬 提交于 2019-12-23 16:26:57
问题 I am trying to modify and copy a custom module i have setup everything DB connection is but getting the error while going to view my module as follows: Zend\ServiceManager\ServiceManager::get was unable to fetch or create an instance for getAlbumTable Here is the my module.config file: return array( 'controllers' => array( 'invokables' => array( 'Album\Controller\Album' => 'Album\Controller\AlbumController', ), ), // The following section is new and should be added to your file 'router' =>

SOAP Client receiving empty stdclass

£可爱£侵袭症+ 提交于 2019-12-23 13:39:19
问题 I don't understand why I am getting an empty stdclass object. Here's the code: $client = new Zend_Soap_Client('http://urltocodethatgenerateswsdl?wsdl', $options); $result = $client->sayHello(array( 'who' => 'Heidi')); Zend_Debug::dump($client->getLastResponse()); Zend_Debug::dump($result); Here's what I get for the lastResponse: <?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://urltocodethatgenerateswsdl">

Zend Framework: get subdomain parameter from route

不想你离开。 提交于 2019-12-23 13:15:12
问题 UPD: Solved. The problem was because we're using nginx as a frontend. So nginx doesn't pass the HTTP_HOST to apache. Hi there! I'm having a problem with getting subdomain parameter in my base controller on a production server while on the localhost it's ok. other parameters from url like controller, action returned as they should. this returns null on production: $agencyName = (string) $this->_getParam('agency'); no changes made to .htaccess: RewriteEngine On RewriteRule ^main - [L,NC]

Zend_form_element_select onchange in zend framework

和自甴很熟 提交于 2019-12-23 13:00:02
问题 I have a form named createDevice.php as: class Admin_Form_CreateDevice extends Zend_Form { public function init() { $this->setName('Create Device Access'); $sort=new Zend_Form_Element_Select('employee_name'); $sort->setLabel('Employee Name:'); $this->addElements(array($sort)); /* Form Elements & Other Definitions Here ... */ } } Now In controller action named viewDeviceAction() I have called this form as: public function viewDeviceAction() { echo 'viewDevice: '; $form_device=new Admin_Form

How bootstrap works in general and particularly in Zend Framework?

北城以北 提交于 2019-12-23 12:48:18
问题 I’m reading Zend Framework manual and cannot understand how bootstrapping works particularly in ZF and in general. They write: Your Bootstrap class defines what resources and components to initialize. Ok. It means that the Bootstrap class should be instantiated the first of all. But then then they write about the configuration ini file. And there are directives about the Bootstrap class itself in it: 1. bootstrap.path = APPLICATION_PATH "/Bootstrap.php" 2. bootstrap.class = "Bootstrap" So as

404 The requested URL could not be matched by routing

心已入冬 提交于 2019-12-23 12:42:58
问题 I'd just started to learn zend-framework and following this user guide. I'm able to successfully install the zend skeleton application and moved on to the routing and controllers. But after completion of the tutorial I requested the url: http://zf2-tutorial.localhost/album in my browser and I'm getting 404 . I'd looked down into the comments where some people saying about changes in 'route' => '/album[/][:action][/:id]' needs to be 'route' => '/album[/:action][/:id]' but that doesn't help

GreaterOrEqual validator in Zend Framework

▼魔方 西西 提交于 2019-12-23 12:33:53
问题 Realized few minutes ago that there is no GreaterOrEqualThan validator, or a parameter in GreaterThan validator that changes its behaviour from > to >= . Why? Is it possible to compose >= validator using basic zend framework set of validators? Yes, guys, I know that I can write my own validator, but I'm curious about solution based on native ZF validators ;-) 回答1: I'd set array('min' => ($value-1)) and use GreaterThan . Maybe use a chain and add Digits , so you make sure you're dealing with

Zend framework: “url not found” only with index controller, only if lowercase

不羁岁月 提交于 2019-12-23 12:26:42
问题 This is my problem: I have a working zend application running on aruba/linux. It seems to work well. I have some controllers: index, user, video, ... if i type "http://www.foo.com/public/" i can reach my index controller and index action. if i type "http://www.foo.com/public/user/register" i can reach my user controller and register action. if i type "http://www.foo.com/public/index/index" the server return url not found :( But the most strange thing is that if i type "http://www.foo.com

Zend Framework, mapping the extension of a URL to the format parameter?

与世无争的帅哥 提交于 2019-12-23 12:23:42
问题 It is possible to map the extension of a URL, to the format parameter in ZF? I'd like the default routing to still work, including mapping parameters from the URI, so you'd be able to say: http://example.com/controller/action/param1/value1/param2/value2.json Here: $this->_getParam('format') => "json" And likewise: http://example.com/module/controller/action/param1/value1/param2/value2.xml Here: $this->_getParam('format') => "xml" I've fiddled with the default routes, but i cannot get it to

Upgrading Zend Framework - Steps & Guidance

扶醉桌前 提交于 2019-12-23 11:46:33
问题 The site I maintain is currently using Zend Framework 1.8.0, which is over 2 years old. I'd like to upgrade to 1.11.11 and am having some trouble finding basic guidelines for how to pull this off smoothly. Is it as simple as overwriting the library/Zend folder with the latest files? Here are my steps I plan on taking. Am I missing anything? Download latest Zend Framework code. SSH into the server and copy library/Zend to /path/to/webapp/library and call the folder something like Zend-1.11.