zend-framework

Zend Form Validator Callback: How to exclude a username?

让人想犯罪 __ 提交于 2020-01-01 22:27:08
问题 I have written one function in User Mapper class userExist($username) which return true if same username does not exist in my database table. Now I want to use this function in the Add_User_Form class which extends Zend_Form. I want to use: $username = $this->createElement('text','username'); $username->setLabel('Username:') ->addValidator('Callback', true, array('callback'=>userExist???)); Can I use mapper class userExist($username) function as callback function? Please let me know if I am

Using Zend_Db and multiple tables

拈花ヽ惹草 提交于 2020-01-01 19:54:49
问题 I have a normalized database that stores locations of files on the internet. A file may have multiple locations spread across different sites. I am storing the urls in two parts (Site.UrlStart, FileLocation.UrlEnd). The UrlEnd is the part unique to that file (for the site). Simplified Db structure: http://img231.imageshack.us/img231/9134/dblayout.jpg I am using Zend_Db as my ORM (If it is that), with classes for the tables inheriting from Zend_Db_Table_Abstract. The issue is that retrieving

Multipart messages including multiple attachments (“attachment” and “inline”) with Zend Mail – RFC-compliant?

廉价感情. 提交于 2020-01-01 19:16:34
问题 Our company has developed its own CMS based on Zend (version 1.8.4). Switching to a new version is out of the question for the moment. We are using Zend Mail for sending (multipart) messages with embedded images ( Content-Disposition: inline; ) and downloadable attachments ( Content-Disposition: attachment; ). A few days ago, a customer reported problems opening such a mail on his Apple iPhone 5 (internal mail client): In the inbox the mail was indeed marked with a symbol indicating that the

Check a condition and also identify the pattern in url through Regex in Zend

♀尐吖头ヾ 提交于 2020-01-01 19:08:08
问题 i am implementing the Zend Regex Routing, and i have to perform multiple checks for the url. For example, if this is my url: http://localhost/application/public/index.php/module/controller/action and this is my regex condition in my bootstrap file, which matches when the url does not contain "login": $router->addRoute('ui', new Zend_Controller_Router_Route_Regex( '^((?!login/).)*$', array( 'module' => 'mod1', 'controller' => 'cont1', 'action' => 'action1' ), array( ) )); Now i also want to

Check a condition and also identify the pattern in url through Regex in Zend

戏子无情 提交于 2020-01-01 19:07:11
问题 i am implementing the Zend Regex Routing, and i have to perform multiple checks for the url. For example, if this is my url: http://localhost/application/public/index.php/module/controller/action and this is my regex condition in my bootstrap file, which matches when the url does not contain "login": $router->addRoute('ui', new Zend_Controller_Router_Route_Regex( '^((?!login/).)*$', array( 'module' => 'mod1', 'controller' => 'cont1', 'action' => 'action1' ), array( ) )); Now i also want to

Zend Framework: Multidb fails to initialize

陌路散爱 提交于 2020-01-01 19:03:15
问题 This used to work but after some modifications by the other programmers it just fails to work. I have this code on my Bootstrap: protected function _initDatabase () { $resource = $this->getPluginResource('multidb'); $resource->init(); Zend_Registry::set('gtap', $resource->getDb('gtap')); Zend_Registry::set('phpbb', $resource->getDb('phpbb')); } Upon loading, this error shows up: Fatal error: Call to a member function init() on a non-object in /var/www/gamebowl3/application/Bootstrap.php on

Zend Framework: Multidb fails to initialize

浪子不回头ぞ 提交于 2020-01-01 19:03:14
问题 This used to work but after some modifications by the other programmers it just fails to work. I have this code on my Bootstrap: protected function _initDatabase () { $resource = $this->getPluginResource('multidb'); $resource->init(); Zend_Registry::set('gtap', $resource->getDb('gtap')); Zend_Registry::set('phpbb', $resource->getDb('phpbb')); } Upon loading, this error shows up: Fatal error: Call to a member function init() on a non-object in /var/www/gamebowl3/application/Bootstrap.php on

Using Zend Service Amazon

橙三吉。 提交于 2020-01-01 18:15:06
问题 Originally, I was searching how to use php to retrieve book information from amazon. and I found this question: How can I use Amazon's API in PHP to search for books? I think this works, but I am having stupid question. I am not able to install and use Zend Service Amazon. I downloaded the software of around 60 MB but, was corrupted. May be, I actually want some php files to implement it. but, its giving some kind of exe file. so, here my question is; Where do I download Zend framework? How

Magento - Custom Payment Module

十年热恋 提交于 2020-01-01 17:00:08
问题 This is a very general question, but here goes: I'm trying to create a custom payment module in Magento. I've created a 'regular' module that hooks into the Magento event/observer model. But how do I tell Magento to treat a module as a payment module, so it shows up in the admin backend AND on the checkout page? 回答1: My general answer would be to try and reverse engineer the magento paypal module in magento core. Then you can create a module that will be similar to your desired functionality.

Magento - Custom Payment Module

六眼飞鱼酱① 提交于 2020-01-01 16:58:30
问题 This is a very general question, but here goes: I'm trying to create a custom payment module in Magento. I've created a 'regular' module that hooks into the Magento event/observer model. But how do I tell Magento to treat a module as a payment module, so it shows up in the admin backend AND on the checkout page? 回答1: My general answer would be to try and reverse engineer the magento paypal module in magento core. Then you can create a module that will be similar to your desired functionality.