zend-framework

amazon sqs :read message not in order

牧云@^-^@ 提交于 2019-12-23 03:15:16
问题 i would like to take messages from amazon sqs in the same order in which it is inserted into sqs ( first in first out model). Is their any way to implement it?? I am using zend php for programing. 回答1: Unordered message delivery is inherent in the design of SQS. You could try to work around it by numbering the messages and storing the out-of-order messages locally until the missing messages arrive, but its probably not worth the hassle. SQS is really a bit of an odd duck, it does what it says

amazon sqs :read message not in order

烈酒焚心 提交于 2019-12-23 03:15:08
问题 i would like to take messages from amazon sqs in the same order in which it is inserted into sqs ( first in first out model). Is their any way to implement it?? I am using zend php for programing. 回答1: Unordered message delivery is inherent in the design of SQS. You could try to work around it by numbering the messages and storing the out-of-order messages locally until the missing messages arrive, but its probably not worth the hassle. SQS is really a bit of an odd duck, it does what it says

Creating/updating schema from Doctrine entities

◇◆丶佛笑我妖孽 提交于 2019-12-23 03:14:06
问题 I'm using Doctrine with Zend Framework. I have to create both the DB schema and the Doctrine entities with annotations. Since the annotations already contain the information, it should be possible to create/update the schema based on them. I don't want to reinvent the wheel, so I was wondering whether that kind of logic already existed? 回答1: You can use the doctrine CLI, for a lot of doctrine related tasks. I'm not sure how doctrine is integrated into Zend, but look for the doctrine.php, and

setting layout file for module inside bootstrap in zend

痞子三分冷 提交于 2019-12-23 02:56:22
问题 My zend application structure: application ->configs ->layouts ->scripts ->admin.phtml ->site.phtml ->modules ->admin(controllers, models, views) ->Bootstrap.php ->default(controller,models,views) ->Bootstrap.php I have set the default layout in my application.ini as: resources.layout.layoutPath = APPLICATION_PATH "/layouts/scripts" resources.layout.layout = "site" I have two modules: admin and default. How to set the layout file (admin.phtml)for admin module? I want to change the layout from

Zend Framework - Where to put the robots.txt file?

跟風遠走 提交于 2019-12-23 02:52:36
问题 Zend framework i have directory tree as following with robots.txt file, but when i browse www.site.com/robots.txt , it says page not found error. How do i tell ZF that robots.txt is allowed? A. Directory tree: wwwsite/application wwwsite/library wwwsite/ZendFramework-1.10.7.tar.gz wwwsite/public . |--- captcha | |--- css |--- js |--- img |--- files | .htaccess index.php robots.txt B. .htaccess RewriteEngine On RewriteCond %{REQUEST_FILENAME} -s [OR] RewriteCond %{REQUEST_FILENAME} -l [OR]

Route module on subdomain in Zend Framework

陌路散爱 提交于 2019-12-23 02:49:10
问题 I'm having trouble getting the Zend_Controller_Router_Route_Hostname to work properly. I'm using Zend Framework 1.9.4 In my config I have: resources.router.routes.www.type = "Zend_Controller_Router_Route_Hostname" resources.router.routes.www.route = ":module.domain" resources.router.routes.www.defaults.module = "frontend" resources.router.routes.www.chains.index.type = "Zend_Controller_Router_Route" resources.router.routes.www.chains.index.route = ":controller/:action/*" resources.router

How can i pass variables in Zend?

丶灬走出姿态 提交于 2019-12-23 02:46:15
问题 I have a form on my index, and when it valid, it redirects to a new view, and i want on that new view to get the name that was entered in the form, how can i do that? my controller: public function indexAction() { // action body $eform = new Application_Form_Eform(); if ($this->_request->isPost()) { $formData = $this->_request->getPost(); if ($eform->isValid($formData)) { $nameInput = $eform->getValue('nameInput'); $this->_helper->redirector->gotoRoute(array('controller'=> 'index','action' =>

PHPUnit test a method that returns an objects property

*爱你&永不变心* 提交于 2019-12-23 02:38:57
问题 public function thisMethod { $example = $this->methodReturnsObject()->this1->that2->there3->id; return $example; } How would you test thisMethod in PHPUnit? Obviously I could write an expectation that methodReturnsObject() will return something... but what? That object has properties associated with it, but how would you even mock that value? 回答1: The answer is "You don't". Unit testing should test each class in isolation, what you are trying to do there is not a unit test. As I said in my

Zend Framework : Detecting which controller or page you are using / are on

淺唱寂寞╮ 提交于 2019-12-23 02:18:57
问题 I'm trying to detect which controller I'm using or what controller I'm on and then change my menu accordingly to the page I'm on. ( Make a selection in the menu so the user can see were he is on the page! ) I really don't know what to write to check what it's using... <? if($this->url(array("controller" => "index", "action" => "index"), null, true)) { echo("LOL"); } ?> I tried that but that stuff didn't work at all, I know it's the wrong thing to use, so please help me =D 回答1: You can get

eclipse PDT: How to enable content/code assist for personal PHP libraries

血红的双手。 提交于 2019-12-23 02:01:56
问题 I am struggeling getting content/code assist to work for PHP libraries (other than Zend) in my Zend Framework project folder: library Doctrine Zend (<-works with code assist...) ZendX Content assist remains blank when using this libraries... Any suggestions? Thanks, Udo 回答1: Content Assist is available for any compatible resources in the include path. Right click your project folder. Then Include Path . Then Configure Include Path . A window will appear. Configure any needed resources.