zend-framework

action parameters routing not working in Zend framework routes.ini

不羁的心 提交于 2019-12-13 03:53:51
问题 I'm trying to set up a route in Zend Framework (version 1.11.11) in a routes.ini file, which would allow be to match the following url: my.domain.com/shop/add/123 to the ShopController and addAction . However, for some reason the parameter (the number at the end) is not being recognized by my action. The PHP error I'm getting is Warning: Missing argument 1 for ShopController::addAction(), called in... I know I could set this up using PHP code in the bootstrap, but I want to understand how to

application.ini - How it works

℡╲_俬逩灬. 提交于 2019-12-13 03:35:08
问题 I'm just start to learning Zend Framework 1.12.9. and I can't understand how to work application.ini file. So, to my question was more understandable, I will give an example: `; application/configs/application.ini [production] ; PHP settings we want to initialize phpSettings.display_startup_errors = 0 phpSettings.display_errors = 0 includePaths.library = APPLICATION_PATH "/../library" bootstrap.path = APPLICATION_PATH "/Bootstrap.php" bootstrap.class = "Bootstrap" appnamespace = "Application"

Get last 7 days records from table in zend

此生再无相见时 提交于 2019-12-13 03:25:00
问题 Hi guys i am trying to get last 7 days closed tickets from table Here is the query i have wrote 'closed' => new Zend_Db_Expr('SUM(IF(rt.assignee_id IS NOT NULL,IF(rt.status_id = 24,1,0),0))') can any one help me how can i add my condition inside IF? Thanks in advance. 回答1: 'closed' => new Zend_Db_Expr('SUM(IF(rt.assignee_id IS NOT NULL, IF(rt.status_id = 24, IF(created >= CURDATE() - INTERVAL 7 DAY, 1,0),0),0))') not 100% sure about the CURDATE() - INTERVAL 7 DAY , but i think you will

Variable Reference as Function Argument

我只是一个虾纸丫 提交于 2019-12-13 03:21:48
问题 All about a Zend Application with an action helper. I want to unset some pairs of an array by a function. helper: class Application_Controller_Action_Helper_TestHelper extends Zend_Contr[...] { public function direct(&$array) { if(isset($array['key'])) unset($array['key']); } } controller: $this->_helper->TestHelper($var); How could I get it working? 回答1: You must also pass it as reference : $this->_helper->TestHelper(&$var); UPDATE: Ups, I had my errors turned off. You (and now me) are

problem with highcharts series option

淺唱寂寞╮ 提交于 2019-12-13 03:13:35
问题 Hi i am having problem with my highcharts 'series' options. i initialized the chart options as below: var options = { chart: { renderTo: 'chart', defaultSeriesType: 'line', }, title: { text: 'Weight Monitor', }, xAxis: { title: { text: 'Date Measurement' }, categories: [] }, yAxis: { title: { text: 'Weight (in Lbs)' } }, series: [] }; I kept the categories: [] blank so that i can put the values in categories later. Same thing i did with my series options. I kept the data:[] as blank to fill

In what format does $form->setData() accepts the form data in controller

廉价感情. 提交于 2019-12-13 03:07:47
问题 The problem is one of sending the form data from client to the Zend Controller. I want to validate the form using isValid() method of Form. But it always returns false. I think I am not able to give right format data to $formData->setData(). The details are as given below. ..... var fData = $('#responsibleAddressForm').serializeArray(); $.ajax({ url: '/vvt/controller /storeResponsibleAddress', data: fData, type: 'POST', dataType: 'json', async: true, success: function(controller) { alert("in

Problems with setting the path for Zend framework, needed for Youtube API

放肆的年华 提交于 2019-12-13 02:51:44
问题 I copied & pasted this text here. It seems the editor seems to format some parts randomly. ;) I downloaded ZendGdata 1.9.6, extracted it & uploaded it to my site's root folder ..., which I need for use with Youtube API to get videos onto my site. I must say I’m new to all this, and so I would appreciate taking this into account. The library folder is at /ZendGdata/library. The problem I'm having is Step. 3 when I follow instructions (http://code.google.com/intl/de-DE/apis/gdata/articles/php

What are the caching techniques that can be implemented while developing a dynamic Website?

こ雲淡風輕ζ 提交于 2019-12-13 02:48:41
问题 I need to know all the caching techniques that can be implemented in a website, so that I could speed up the performance. I never needed caching before, so I am totally unaware of how to do it or even what to do, and anything about it. I am looking for some tutorials, articles or anything helpful. 回答1: I would start with this: http://www.mnot.net/cache_docs/ It is very in-depth and by the time you finish reading it you'll be caching in no time flat. There are several things you may want to

PHP file_get_contents('php://input') very slow

隐身守侯 提交于 2019-12-13 02:38:58
问题 I have a complex PHP application that uses an ESB model built with Zend Framework v1.x. Performance has become an issue, and now I know why: reading the php://input stream is consistently taking almost exactly 10 seconds. Here is a snippet from an XDebug trace log: 0.3985 6935880 -> Zend_Controller_Request_Http->getRawBody() /var/www/vas/Adapters/Database/application/controllers/AdapterController.php:473 0.3985 6936104 -> file_get_contents() /usr/share/php/ZendFramework-1.12.0/library/Zend

Add Zend_Navigation to the View with old legacy bootstrap

这一生的挚爱 提交于 2019-12-13 02:37:06
问题 I've been struggling with Zend_Navigation all weekend, and now I have another problem, which I believe has been the cause of a lot of my issues. I am trying to add Zend_Navigation to a legacy 1.7.6 Zend Framework application, i've updated the Zend Library to 1.9.0 and updated the bootstrap to allow this library update. The problem is that I don't know how, and the examples show the new bootstrap method of how to add the Navigation object to the view, I've tried this: //initialise the