zend-framework

Zend framework default MVC implementation

空扰寡人 提交于 2019-12-13 02:36:13
问题 I have been using Zend Framework for a while now. I am having an issue since de beginning an after reading a lot of documentation i was wondering why all exemples dont mention it. If I am right, the MVC design pattern favorise a single entry point to interract with the application. With Zend its the index.php file in the public folder. I tried to use this way with the default (v 1.09) .htaccess that Zend provides : RewriteCond %{REQUEST_FILENAME} -s [OR] RewriteCond %{REQUEST_FILENAME} -l [OR

Zend: Redirect from form without validation

試著忘記壹切 提交于 2019-12-13 02:32:25
问题 I have a form for the creation of new "groups". I now added a small "go back" image with which the user should be able to go back one step. I don't know why, but when I click this new image, the controller and action used for the form which I want to leave ( /admin/creategroup ) is called again with HTTP POST set. Therefore, the form validation is done, and I'm stuck at this form with the validation errors displayed. This is a snippet of the code from my form with both image-buttons. I wan't

Refactoring a Zend_Auth implementation

笑着哭i 提交于 2019-12-13 02:30:23
问题 I am working on an existing project that has two areas that can be logged into. An admin section and the front end. Currently the admin section has a login action and the front end has its own login action. Admin logs in using a database table specifically for admin accounts, the front end is logged in using a different table all together. If the admin is logged in and tries to then log into the front end they are prompted to log in as a front end user (needed because front end users get

How to disable layout inside a plugin?

非 Y 不嫁゛ 提交于 2019-12-13 02:05:30
问题 Here is what i'm trying to do <?php class My_Controller_Plugin_SomePlugin extends Zend_Controller_Plugin_Abstract { public function preDispatch(Zend_Controller_Request_Abstract $request) { $this->_helper->layout()->disableLayout(); } } but it doesn't work, any ideas on how could i disable the layout inside a plugin ? 回答1: This should be enough if you are using Zend_Layout::startMvc() Zend_Layout::getMvcInstance()->disableLayout(); 来源: https://stackoverflow.com/questions/1670633/how-to-disable

Change HTML output of Zend_Form

血红的双手。 提交于 2019-12-13 01:38:08
问题 I'm trying to change the html outputted by Zend_Form using decorators. I want the outputted HTML to look like this: <form> <fieldset> <legend>Your Details</legend> <dl> <dt>label etc</dt> <dd>input etc</dd> <dt>label etc</dt> <dd>input etc</dd> </dl> </fieldset> <fieldset> <legend>Address Details</legend> <dl> <dt>label etc</dt> <dd>input etc</dd> <dt>label etc</dt> <dd>input etc</dd> ... etc ... </dl> </fieldset> </form> I've already broken the sections down i want within specific fieldsets

Zend SOAP server WSDL URI with http authentication

只谈情不闲聊 提交于 2019-12-13 01:17:52
问题 I'm trying to set up a SOAP service using Zend_Soap_Server. (ZF1) My problem is that the WSDL URI is password protected. It can be accessed by setting 'https://username:password@wsdl.uri' as the URI, but the username and password are different for the development and live versions of the application. I've tried setting the login and password with $soapServer->setOptions(array('login'=>$login, 'password'=>$password)); but nothing happens. How can I achieve this? (if it's possible) 回答1: The

MySQL Connection Closing During Parallel Cron Tasks

此生再无相见时 提交于 2019-12-13 01:06:30
问题 I have written a Zend Framework based cron service for parallel tasks based on these two blog articles: Cron tasks in Zend Framework apps Zend Framework Cron Tasks in Parallel In summary, the cron services uses pcntl_fork() to spawn the tasks in parallel. Running a single task with the service works without issues, but when I add a second task, I get this MySQL error: General error: 2006 MySQL server has gone away My best guess is that a child thread ends before the other and the MySQL

Change the Dashboard Graph in version 1.7/1.12 of Magento

爱⌒轻易说出口 提交于 2019-12-13 00:39:36
问题 In previous versions of Magento (1.6 and before for CE, 1.11 and before for EE) the graph on the admin Dashboard would reflect the count of total orders taken. Since 1.7/1.12 this has now been changed to reflect orders that have been invoiced. We use custom statuses and like having the Dashboard graph as a quick heart beat type report on sales. However, none of our orders ever reach an invoiced status because of how we handle back end order processing (not through Magento) How can I change

Zend Honeypot Validation

 ̄綄美尐妖づ 提交于 2019-12-13 00:35:16
问题 On my bootstrap I don't have a class, it's a simple php file: I have added there: $loader = Zend_Loader_Autoloader::getInstance (); $loader->setFallbackAutoloader ( true ); $loader->suppressNotFoundWarnings ( false ); //resource Loader $resourceLoader = new Zend_Loader_Autoloader_Resource(array( 'basePath' => APPLICATION_PATH, 'namespace' => '', )); $resourceLoader->addResourceType('validate', 'validators/', 'My_Validate_'); $loader->pushAutoloader($resourceLoader); Then, in application

Zend Framework Error : The requested URL was not found

余生长醉 提交于 2019-12-13 00:29:58
问题 I'm trying to set up my zend framework application on this host but I'm getting a Requested URL not found error: The application isn't at the root level i.e its in a folder like: www.mysite.com/zendapp/public The error says that it can't locate the index.php file even though the url given in the erro message is correct. Is this an htaccess issue? The homepage opens fine - the issue arises when I click on any link. Here is my htaccess file: RewriteEngine On RewriteCond %{REQUEST_FILENAME} -s