zend-framework

Why is the MVC paradigm best suited for web applications?

为君一笑 提交于 2019-12-22 09:57:17
问题 I'm fairly certain my professor will ask me why I chose to use MVC for my web application. Truth be told, I'm new to MVC. I read about it, I'm building a blog application using it, I think it's very logical to approach a problem this way. But why? O_O I draw a blank. How is better suited than say, building an N-tier application? 回答1: Well, basically: separation of concerns on the usage level, not the physical level. Quoting PoEAA on MVC MVC splits user interface interaction into three

Google Spreadsheet API: memory exceeded

╄→гoц情女王★ 提交于 2019-12-22 09:39:32
问题 Don't know if anyone has experience with the Google Spreadsheets API or the Zend_GData classes but it's worth a go: When I try to insert a value in a 750 row spreadsheet, it takes ages and then throws an error that my memory limit (which is 128 MB!) was exceeded. I also got this when querying all records of this spreadsheet but this I can imaging because it's quite a lot of data. But why does this happen when inserting a row? That's not too complex, is it? Here's the code I used: public

Zend_Validate_Float locale not working with hi_IN locale

此生再无相见时 提交于 2019-12-22 09:38:26
问题 While working with number validation with 'hi_IN' I am facing following problem. where Zend_Locale_Format::isFloat is working fine for non single digit and any locale but not working for single digit and locale 'hi_IN' Source Code : (test cases) foreach (array('en_GB','en_US', 'lo_LA', 'hi_IN') as $locale) { foreach (array('12', '1') as $value) { if (!Zend_Locale_Format::isFloat($value, array('locale' => $locale))) { echo $value .' ==> '. $locale .' TRUE <br>'; } else { echo $value .' ==> '.

Zend_Validate_Between strange error message

喜欢而已 提交于 2019-12-22 09:11:07
问题 I am experimenting with the Zend_Validate_Between class. I set it up thusly: $scoreBetweenValidator = new Zend_Validate_Between(-3, 3, true); so the validator should only accept values between -3 and 3, inclusive. On an invalid value I got a '%value%' was not found in the haystack error message, which I think belongs to the Zend_Validate_InArray class (Zend_Validate_InArray::NOT_IN_ARRAY). My problem is that I wish to use custom error messages with the setMessages method, but I don't know how

ZF + Doctrine2 phpUnit error: PDOExeption: You cannot serialize or unserialize PDO instances

前提是你 提交于 2019-12-22 08:54:38
问题 I'm using DynamicGuys doctrine2 integration into zend framework(https://github.com/dynamicguy/zf1doctrine2). It works, but if i want to make tests with phpUnit i get this error: PDOExeption: You cannot serialize or unserialize PDO instances I've searched a bit, and i found out that if i comment out line 44 in this file: https://github.com/dynamicguy/zf1doctrine2/blob/master/library/ZendX/Doctrine2/Application/Resource/Entitymanagerfactory.php phpUnit works, but of course the rest of the

Zend Framework won't let me include Google Maps API

两盒软妹~` 提交于 2019-12-22 08:52:44
问题 I'm experiencing this problem: I want to add the Google Maps API to my Zend Framework application using the HeadScript Helper in the bootstrap: $view->headScript() ->appendFile('/static/js/jquery-1.3.2.min.js') ->appendFile('/static/js/jquery-ui-1.7.1.min.js') ->appendFile("http://maps.google.com/maps?file=api&v=2&key=ABQIAAAAfINi4Ug3nkoREt524GX3ABSFqzY8bf3muCS1IE0M5aBPGVvVxRRzm1PmTbIwi_tXaNcSoONdlIx_sA"); But for some reason everytime I try this I get an empty alert box as error. The weird

Zend IMAP search and filters

核能气质少年 提交于 2019-12-22 08:41:01
问题 How do i make search using filters like in gmail. Like getting list of email with specific labels or list of mails from a specific email address. I couldn't able to find it in documentations. Note:I use oAuth for authentication. I hope this has nothing to do with search. 回答1: The labels on Gmail are in fact (from IMAP point of view) folders, so to get all emails with label you can just list e-mails in folder of this name. To search you could use "undocumented" function search() (see Zend/Mail

zend naviagtion not working due to zend route

可紊 提交于 2019-12-22 08:37:48
问题 EDIT:: the problem was caused due to zend route please check updates I am using xml file for navigation. EDIT::the following code is from layout.phtml file $config = new Zend_Config_Xml(APPLICATION_PATH.'/configs/adminnav.xml', 'nav'); $container = new Zend_Navigation($config); $this->navigation()->setContainer($container); echo $this->navigation(); when i am in my edit page, all don't any menu link. all get is /admin/controller/edit/ everywhere on menu item. any idea? my edit action takes id

Best way to build RESTful services using Zend Framework 3

时间秒杀一切 提交于 2019-12-22 08:05:21
问题 We are starting a new project that will make use of RESTful services to talk to web clients (AngularJS) and mobile platforms (Android and iOS). The idea is to hide the bussiness logic inside the RESTful services and to use the same code for both web client and mobile platforms. Our server is being built in PHP using Zend Framework 3 (I´m new to the framework). The application will be have dozen of entities with hundreds of services. I´ve noted on the web that is seems that ZF2 has a REST

Magento default controller action

感情迁移 提交于 2019-12-22 08:00:11
问题 How to create a function for every action? for example I have function: public function indexAction() { $this->loadLayout(); $this->renderLayout(); } but this is for action index, but what when I don't know action, or its created dynamiclly, so for example action could be controller/someaction, controller/someaction2 I would like to create default function which will handle this 回答1: I personally would do something like this: 1 - I would create an abstract class inheriting from Zend