zend-framework

Zend framework module routes - accessing actions

孤人 提交于 2019-12-13 05:24:15
问题 I have modules as follow: modules default controllers IndexController user controllers IndexController If I put an action in the default IndexController called testAction() I can run that action at /index/test or default/index/test as expected. If I put the same action in user IndexController and try and access it at user/index/test this fails to run testAction(). Instead it run indexAction() that is in the same controller. Why does it do that? Extra info: I have an ini file located at

Jqgrid and Zend framework trouble

泄露秘密 提交于 2019-12-13 05:20:32
问题 I have a list of products on my site. I draw it with jqGrid. Also I have a form, to create new product, or update existing one. Is there any way to set in jqGrid, that when I press 'edit' button in grid, it redirects me to page like 'mysite/product/edit/id/{id}' Here is my grid script: $(document).ready(function() { $("#list").jqGrid({ url:'product/getjson', datatype: "json", colNames:['id','Name', 'description', 'Publication date','Picture'], colModel:[ {name:'id',index:'id', width:55},

Zend_Controller_Router_Route_Regex rewrite all my module links

Deadly 提交于 2019-12-13 05:13:29
问题 I'm using Zend_Framework 1. In my Bootstrap.php I rewrite my categories link something like that: $route = new Zend_Controller_Router_Route_Regex("^([a-z,0-9,-]*)(/|)([a-z,0-9,-]*)(/|)([a-z,0-9,-]*)(/|)([a-z,0-9,-]*)(/|)([a-z,0-9,-]*)(/date/|)([a-z]*)(/page/|)([0-9]*)$", array( "module" => "default", "controller" => "categories", "action" => "index" ), array( 1 => 'firstparam', 3 => 'secondparam', 5 => 'theeparam', 7 => 'fourparam', 9 => 'fiveparam', 11 => 'date', 13 => 'page', ) ); $router-

Handling Input with Zend Framework outside MVC

寵の児 提交于 2019-12-13 05:12:35
问题 In a classic Zend Framework MVC setup, there seems to be access to a generic _request object from within the model/view/controller instance as outlined here: $this->_request->getPost('variablename'); is this request object somehow available in a non-MVC setup as well? If yes: how would I initialize and access it? 回答1: I would not use the Zend_Controller_Request_* objects outside ZF's MVC structure ( even if possible ). You can see by the class name already that it belongs to the controller

zf 1.9.6 zend_soap: Function (“doString”) is not a valid method for this service

人盡茶涼 提交于 2019-12-13 04:45:37
问题 Duplicate of this question I'm trying to work with Zend_Soap using zend framework 1.9.6 and php 5.3.1. soap.php (wsdl generator) <?php require_once('Zend/Soap/Server.php'); require_once('Zend/Soap/AutoDiscover.php'); require_once('Soaping.php'); $_WSDL_URI="http://server/soap/soap.php?wsdl"; if(isset($_GET['wsdl'])) { hadleWSDL(); } else { handleSOAP(); } function hadleWSDL() { $autodiscover = new Zend_Soap_AutoDiscover(); $autodiscover->setClass('Soaping'); $autodiscover->handle(); }

Zend_DB whats the right strategy to export large amounts of data to csv? – chunks – fetchAll – fetchRow [duplicate]

我只是一个虾纸丫 提交于 2019-12-13 04:44:40
问题 This question already has answers here : Closed 7 years ago . I have to export a huge amount of data. Also I have to transform every record a little bit through php. Whats the right strategy to export large amounts of data? Do I split Zend_Db requests in multiple chunked queries with limit(1000,x)? Do I use fetchAll or fetchRow? Which fetchrow or fetchall is performing better considering high performance? I cannot use SQL OUTFILE since I have to interpret the xml/html coming from one column.

Zend translate URL and language switcher

安稳与你 提交于 2019-12-13 04:42:48
问题 I have managed to make my URL i18n compliant using Zend_Controller_Router . Ie: en/user/login becomes fr/utilisateur/connexion and both URLs go to the same controller / action . The problem I am facing is the following I have a language switcher that is displayed as follow : Français English Italiano etc. The currently active language doesn't have an anchor tag, but all others do. For the languages that have an anchor on them I am building the URL and I want them to be translated in their

Getting error “Authorized token from Service Provider does not match supplied Request Token details” in 3 legged oauthentication in google api

走远了吗. 提交于 2019-12-13 04:39:59
问题 I want to implement 3 legged oauthentication in google api. Code :- <?php error_reporting(E_ALL); ini_set('display_errors', 1); define('REDIRECT_URI', 'http://example.com/gmail/index.php'); require_once 'Zend/Oauth/Consumer.php'; session_start(); $CONSUMER_KEY = 'xxxxxxxxxxxxxxxxxxx.apps.googleusercontent.com'; $CONSUMER_SECRET = 'xxxxxxxxxxxxxxxxxxxx'; // Multi-scoped token. $SCOPES = array( 'https://docs.google.com/feeds/', 'https://spreadsheets.google.com/feeds/' ); $oauthOptions = array(

routing in zendframework 2 is not working

十年热恋 提交于 2019-12-13 04:38:08
问题 /* Here is my module config */ 'controllers' => array( 'invokables' => array( 'User\Controller\User' => 'User\Controller\UserController', ), ), 'router' => array( 'routes' => array( 'user' => array( 'type' => 'Literal', 'options' => array( 'route' => '/user', 'defaults' => array( 'controller' => 'User\Controller\User', 'action' => 'index', ), ), 'may_terminate' => true, 'child_routes' => array( 'default' => array( 'type' => 'Segment', 'options' => array( 'route' => '/[:controller[/:action]]',

Insert php boolean into mysql bit column with Zend_Db

房东的猫 提交于 2019-12-13 04:33:26
问题 I'm using Zend Framework 1.11.4 and also Zend_Db. The problem is, I have a column for sex which has the value 0 or 1(BIT(1)), when I put false the insertion is fine, but when I put true the following error appears: 'Data too long for column 'sex' at row 1 ' I already debugged and verified it's a boolean! With false(0) no error, but with true the error happens (Class Application_Model_UserNodeMapper): public function save(Application_Model_UserNode $user){ $sex = $user->getSex(); if($sex == 'm