zend-framework

How to use Zend Service Amazon?

陌路散爱 提交于 2019-12-06 05:46:22
问题 I've been doing a lot of digging around and have ended up with a huge headache and no success. I am trying to use the Zend Amazon Service (within my Codeigniter framework) to fetch information about a book using its ISBN. I initially tried it with Zend 1.12 but I kept getting an error about missing parameter AssociateTag. I am now trying with Zend 2.0 but still getting problems. This is the code I am using within my controller: set_include_path(get_include_path() . PATH_SEPARATOR . 'site

How to determine if a web application has been installed and set up?

狂风中的少年 提交于 2019-12-06 05:40:26
I am not sure to be enough be by my question... Well i'm developping a CMS in PHP with Zend Framework. I would like to have a nice web gui to install and set up the application after unpacked it somewhere... Some CMS or whatever the application is, offer this way to do by simply entering an 'install url' like ' http://localhost/app/install ' I'd like to do the same but i don't want to let any users to set it up, so i am looking for a way to determine if the application has been set up or no. Inspired by the pid file in the unix world, i though to do the same with an InstallState file. Writing

Magento: When to pass variables to a block and when not to?

风格不统一 提交于 2019-12-06 05:39:46
I have recently found the power of setting variables to a block in the _toHtml() method, using the assign method. My question is, when is it good to do this and when is it not? I am creating a new module and it seems to me it is much nice to just assign all the variables to the block and just reference those variables in the view file rather then setting up something like this <?php $var1 = $this->getVar1(); $var2 = $this->getVar2(); ?> <div id="<?php echo $var1 ?>"><?php echo $var2 ?></div> Isn't better to just set those in the block class and just call the variables in the phtml file? Then

Inner join in Zend framework

若如初见. 提交于 2019-12-06 05:36:53
I want to make inner join between two tables Visit table has visit_id target Report table has rep_id visit_id Each visit has many reports ,I want to select all reports with specified visit target I make like this but it donesn't work $db = Zend_Db_Table::getDefaultAdapter(); $select = $db->select(); $rows = $select->from('visits_tb', array('target', 'visit_id')) ->joinInner('report_tb', 'visits_tb.visit_id= report_tb.visit_id', array('visit_id', 'rep_id')) ->where("visits_tb.visit_id=$id"); You can try the following; maybe its a bit clearer if you use table aliases: $db = Zend_Db_Table:

Invalid controller specified (error) - Zend Framework

六眼飞鱼酱① 提交于 2019-12-06 05:35:26
问题 I get all the time this error: exception 'Zend_Controller_Dispatcher_Exception' with message 'Invalid controller specified (error)' in blub\libraries\Zend\Controller\Dispatcher\Standard.php:242 I have a file "ErrorController.php" in the "controllers" directory looking like this: class ErrorController extends Zend_Controller_Action { public function errorAction() { // blub } } My bootstrap looks like this: protected function _initController() { $this->_frontcontroller = Zend_Controller_Front:

Secure shared Google Calendar

我的未来我决定 提交于 2019-12-06 05:29:27
I am working on a small scale website. It has a very simple idea, there are two sets of users, office and workers, both have to login to acess the site (the site is built with the Zend framework) . The problem: I want to have a calendar which is accessible by all the users. The office staff being able to edit the calendar and the workers only being able to view the calendar. I really want to user google as the backend for the calendar due to its flexibility: A couple of the office workers work on the road (all have android phones) so the calendar can be shared with those users and they can use

zend soap server response set custom ns1 namespace

一曲冷凌霜 提交于 2019-12-06 05:29:04
问题 I am using Zend_Soap_Server (WSDL mode) for outputting an xml response to the client calls. However, i want to set a custom name for the ns1 namespace in the response. I noticed that the namespace in the response is set by default like: ' ns1:getDoubleResponse ' where ' getDouble ' is the server method being called. Here is my controller and SOAP server setup: class TestController extends Zend_Controller_Action { public function testAction() { // diable laoyouts and renderers $this->getHelper

Pass a variable from Zend controller to zend form

好久不见. 提交于 2019-12-06 05:24:14
I wanted to pass a variable from a controller to the form. How can this be implemented? Can anyone please help me on this issue. Thank you. Frank Thoeny In the controller method of your application. addMultiOptions($options); class OrderController extends Zend_Controller_Action { $options = array( 'foo' => 'Foo2 Option', 'bar' => 'Bar2 Option', 'baz' => 'Baz2 Option', 'bat' => 'Bat2 Option' ); $form = new Application_Form_PlaceNewOrder(); $form->items->addMultiOptions($options); .... } In the form script of your application. class Application_Form_PlaceNewOrder extends Zend_Form { public

Zend Forms - Element ID modification to allow re-use

廉价感情. 提交于 2019-12-06 05:19:55
I have a Zend_Form object that I want to re-use several times in one page. The problem I'm having is that each time it's rendered it has the same element IDs. I've been unable to find a method for giving all the IDs a unique prefix or suffix each time I render the form. Complete Solution Subclass Zend_Form : class My_Form extends Zend_Form { protected $_idSuffix = null; /** * Set form and element ID suffix * * @param string $suffix * @return My_Form */ public function setIdSuffix($suffix) { $this->_idSuffix = $suffix; return $this; } /** * Render form * * @param Zend_View_Interface $view *

Zend framework outputting the letter 'f' onto my page

坚强是说给别人听的谎言 提交于 2019-12-06 05:19:13
I've downloaded the Zend framework stable build (1.11, I believe), uploaded to my servers, and added it to my php include path. My goal is to use the Feed and Feed_Writer modules to handle some RSS and Atom heavy lifting. The problem is that whenever I include the Feed_Writer file, I get a random f that shows up at the beginning of my document. require('Zend/Feed.php'); require('Zend/Feed/Writer/Feed.php'); will result in the f , but doesn't throw a fatal when I instantiate a Zend_Feed_Writer_Feed require('Zend/Feed.php'); will not result in the f , but does throw a fatal when I instatiate a