zend-framework

'Row count is not available in unbuffered result sets.' with Zend Table Gateway

主宰稳场 提交于 2019-12-08 03:38:02
问题 I'm trying to use Zend TableGateway as a stand alone component with my app (not ZF2). Below is a simple test script to just fetch some rows but I get the error Uncaught exception 'Zend\Db\Adapter\Exception\RuntimeException' with message 'Row count is not available in unbuffered result sets.' in /var/www/shared-views-slim/vendor/zendframework/zend-db/Zend/Db/Adapter/Driver/Mysqli/Result.php:324 Below is my code: /** * This makes our life easier when dealing with paths. Everything is relative *

Adding a namespace to a Zend_Feed_Writer_Feed

◇◆丶佛笑我妖孽 提交于 2019-12-08 03:34:46
问题 I'm working on implementing a feed generator for use with Google Product Search for our sites. As Zend incorporates a feed writer class, I decided to go with Atom for the feed format. I've done some work building up a bare-bones Atom feed into which the real product data will be injected, but I've hit a fairly serious snag. Google want a feed file to be a customised version of either RSS or Atom, with an additional namespace attached for the tags Google Product Search uses. For example, <feed

Zend_Mail_Header_HeaderValue::isValid is not valid with special characters

混江龙づ霸主 提交于 2019-12-08 03:31:28
问题 I just encountered an error in an older script (using Zend 1): This is part of an email: --_008_AM2PR07MB0610CE26A6AB7483C300DDC0F4620AM2PR07MB0610eurp_ Content-Type: application/vnd.openxmlformats-officedocument.wordprocessingml.document; name="=?utf-8?B?VmVydHJhdWxpY2hrZWl0c2Vya2zDpHJ1bmdfTGllZmVyYW50ZW5fYmxhbmtv?= =?utf-8?Q?.docx?=" Content-Description: =?utf-8?B?VmVydHJhdWxpY2hrZWl0c2Vya2zDpHJ1bmdfTGllZmVyYW50ZW5fYmxhbmtv?= =?utf-8?Q?.docx?= Content-Disposition: attachment; filename="=

Google Docs API Adding a ressource to a collection (Zend/gdata)

百般思念 提交于 2019-12-08 03:29:38
问题 I'm trying to do this following the API documentation there: https://developers.google.com/google-apps/documents-list/#adding_a_resource_to_a_collection With the Zend PHP gdata Framework my code is : $docs->insertDocument($entryFile, 'https://docs.google.com/feeds/default/private/full/folder%3A0B--Zn-zouTFrOXdrV3lRelhuNHM/contents'); Documentation on this method I don't know how to find the correct URI then... The entryFile parameter is the right type, it's the url that cause the problem the

ACL and appearance manipulation of links, forms and DOM elements

烈酒焚心 提交于 2019-12-08 03:17:18
问题 I would like to find out which strategy is the best for links, forms and DOM elements appearance manipulation (show/hide) on top level of multi modular application (admin, default, etc) ?? It should be done through ACL and it's usage I know well, permission are stored in DB. If someone tries to access certain page (module/controller/action) that is not allowed for him, an info page is passed which says that he is not allowed. In that case all elements are visible. I have a few strategies for

Update a record through model in zend framework

两盒软妹~` 提交于 2019-12-08 03:02:26
I am having a model and would need to update the record. every time $count ($count = $post->save()) is being NULL . how is it possible to know whether this record saved or not. if saved, i want to display the following message 'Post updated' and if not the other message 'Post cannot update'. This is always going to the else port. how can i know model updated correctly or not? $post = new Application_Model_Post($form->getValues()); $post->setId($id); $count = $post->save(); //var_dump($count); exit; if ($count > 0) { $this->_helper->flashMessenger->addMessage('Post updated'); } else { $this->

Optimizing Zend framework routes

☆樱花仙子☆ 提交于 2019-12-08 03:02:04
问题 I'm using a traditional Zend framework application generated using Zend tool . I have several modules in my application all generated using Zend tool too. I'm intending to use the default routes in Zend framework in my application. For example: www.host.com/module/controller/action/param1/value1/param2/value2 Here are my questions: Performance wise, using the default routes is the fastest solution, right? Since I won't ever change the routes, is there a way to make the routing process even

Error with JSON in javascript : unexpected non-whitespace character after JSON data

五迷三道 提交于 2019-12-08 02:46:15
问题 My question is about an error I have when I use jQuery.ajax in my javascript function. I searched and found similar question, but none of these questions helped me. So, what's really weird is that it was working before. I spent a few days working on translations problems with UTF-8 and when I tried it again after, it was working anymore. I can't see what happened so maybe you can help me find out. Here is the code from my controller action which is called for ajax. $project =$_GET['project'];

Invalid controller specified() - Zend Framework

你。 提交于 2019-12-08 02:42:27
I have followed the following documentation and I am having problems. I access the url as localhost/epos and the index page works fine. but if i do localhost/epos/pgeline2d i get error An error occurred Page not found Exception information: Message: Invalid controller specified (epos) Stack trace: #0 /opt/eposdatatransfer/library/Zend/Controller/Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http)) #1 /opt/eposdatatransfer/library/Zend/Application/Bootstrap/Bootstrap.php(97): Zend_Controller_Front->dispatch()

Zend <dt> <dd> decorators: what do I lose by removing them

孤街浪徒 提交于 2019-12-08 02:41:27
问题 This question is specific to Zend_Form. Zend_Form adds standard decorators such as <dd> <dt> <dl> . What do I lose if I were to remove them? Are they used by Zend_Form itself for error reporting or any other reason? 回答1: They are solely for structuring the output of your Zend Form elements in a definition list. Whether your form renders errors is controlled through the Error Decorator. See this series of articles by Matthew Weier O'Phinney: The simplest Zend Form Decorator How to layer