zend-framework

Creating own Zend_Auth_Adapter

瘦欲@ 提交于 2019-12-08 06:06:56
问题 i am having difficulties creating my own Zend_Auth_Adapter. i am using Doctrine 2 with it also. so far i have ... code below i am getting the error Method "hasIdentity" does not exist and was not trapped in __call() whats wrong? use \Doctrine\ORM; class Application_Auth_Adapter implements Zend_Auth_Adapter_Interface { private $username; private $password; function __construct($username, $password) { $this->username = $username; $this->password = $password; } function authenticate() { $em =

Get error while editing Customers from back end in Magento

二次信任 提交于 2019-12-08 06:05:36
问题 I suddenly started encountering this error out of no where and need some help. In my Manage Customers section, when ever I add a new customer, it shows up fine with all values correct. But whenever I try to edit a newly added customer I get an error page in Magento. There has been an error processing your request. And later when I return to 'Manage Customers' grid, the 'Customer Since' column for that customer record changes to this value "30 Nov -1 01:00:00" So does any one have any idea

Zend Date is giving me fatal error msg

五迷三道 提交于 2019-12-08 06:02:03
问题 I just want to use a few classes Zend offers, Zend Date, Zend Mail, and a few others, but I can't get the date one to even do anything. I've included it this way: include_once '../classes/zend/library/zend/date/DateObject.php'; $date = new Zend_Date(time()); Here's the error: Fatal error: Class 'Zend_Date' not found Do I have to go through the steps to change the configuration files for apache, and php just to use this one class? Any help is appreciated. Thanks. 回答1: You need Zend/Date.php,

Change Layout in Bootstrap

帅比萌擦擦* 提交于 2019-12-08 05:55:33
问题 I am new with zend and I have a problem changing my layout in the bootstrap. I want to change my layout when the user is logged in. My function to change the layout in the bootstrap is like this: protected function _initAuthState() { $layout = new Zend_Layout; $layout->setLayoutPath('/layouts/scripts'); if (Zend_Auth::getInstance()->hasIdentity()): // Logged in. $layout->setLayout(layout2); else: // Not Logged in. $layout->setLayout(‘layout’); endif; } This code doesn't work, the layout is

Invalid controller specified() - Zend Framework

会有一股神秘感。 提交于 2019-12-08 05:52:32
问题 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

Zend_Form - multiple forms on same page

a 夏天 提交于 2019-12-08 05:48:50
问题 Having multiple forms in one page, when i submit one of them, how can i tell wich one was submitted? I thought about generating uniqe ids for each from, and saving them as hidden fields and to the user-session - while this is a solution, the problem with it is that there is no good place to remove old ids from the session. Any better ideas how to solve this problem? Thanks in advance! 回答1: First of all: have you considered sending the two forms to two different actions? That way you can

Imap IDLE in Zend Framework

你说的曾经没有我的故事 提交于 2019-12-08 05:47:31
问题 I am searching for the IMAP IDLE function in the Zend Framework. I would either like to know whether it is integrated or if it could be done. I have read that the IlohaMail library seems to have implemented the function - at least in a modified version used in roundcube. 回答1: Zend Framework supports issuing the "NOOP" - No operation - command to the IMAP servers to renew the connection. According to http://www.isode.com/whitepapers/imap-idle.html, this resembles the IMAP IDLE process. 来源:

How can I reduce my Class Name in Zend to call it from any where in application?

℡╲_俬逩灬. 提交于 2019-12-08 05:44:22
问题 I want to follow Zend file naming convention. I have Object.php file with a class and a function in it. MyZendProject->application->models->Test->Object.php class Model_Test_Object { public function test() { echo "Test"; } } Now I want to access above test function in following file but it is not finding it. MyZendProject->application->modules->test->controllers->TestController.php $testModel = new Model_Test_Object(); $testModel->test(); But when I name the class Application_Model_Test

FlashMessenger in Zend 2

狂风中的少年 提交于 2019-12-08 05:42:29
问题 I am doing zend 2 Study. Now I checkout flashMessenger helper. It seems there are no documented way to call flashMessenger at layout.php. because I want to show all messages (error or success) at div located at layout, I need to call flashMessenger there. I do not want to send messages everytime via controller's actions and just want action only add message and layout show them. While I am open to custom helper/libs But builtin solution is the best. ( I do not much work on zend 1 also, So I

Zend Framework URL - How to pass a query string?

不想你离开。 提交于 2019-12-08 05:34:30
问题 I have this link: <a href="<?php echo $this->url(array('controller'=>'index','action'=>'form'),NULL,TRUE);?>"> Form </a> With this I get something like: http://foo.com/form I need to pass a param to the URL with this link. So that I can have something like this instead: http://foo.com/form?bar=1231 How can we accomplish this ? Thanks in advance. 回答1: The URL view helper is used to create links using the Routes setup with your application. If you aren't following the routes setup, then there