zend-framework

Can gcm be used to send and receive messages between android devices?

≯℡__Kan透↙ 提交于 2019-12-07 18:06:51
问题 I have two android devices that runs a gcm client app. I get the Reg IDs of both the devices. I also have a server API key. Now the thing is, Using a simple php code using cUrl or Zend framework, I'm able to send message from a web server to one of my droids (Of course I can broadcast too). But, with this in hand, is there any way to send a string from one device to another? 回答1: Quoting myself from my book: You might be tempted to use GCM for peer-to-peer messaging, without a server of your

Using “.” for decimals in zend validator float

微笑、不失礼 提交于 2019-12-07 17:47:44
问题 I have a form with a element called "price". I validate this element with the "float" validator. The thing is when I insert, for example: 12,50 => it is valid but when I try to save it on the DB (mysql) it is saved as "12.00" So I wanna to change the decimal character from "," to ".". Does anybody knows how?? Note. If I put: $price->addValidator('Float', 'de') or $validator = new Zend_Validate_Float(array('locale' => 'de')); $price->addValidator($validator) It does not work. 回答1: You can use

Login to wordpress site from my site

北战南征 提交于 2019-12-07 17:40:35
问题 I have a website which is being developed using Zend Framework. I also have a Wordpress site placed on the same server. Is it possible to login to Wordpress site using any (e:g AJAX call) when i login to my Zend site. Reason: I have a link to word press blog on Zend site, and when i click on that link, it takes me to Wordpress login page. I want the user to be taken to word press blog page link as a logged in user. I researched a lot on this, but not finding the correct path. Thanks. 回答1:

Magento Tier Sales Prices?

谁说我不能喝 提交于 2019-12-07 17:31:49
问题 I've been trying to mirror some functionality in Magento (v1.6) as seen on another website. In the example, the store owner has set up the ability to apply sales prices to a tier. (most likely tierprices.phtml as the wrapper) by applying a sales price (most likely in admin / product / price sales) I've been working on figuring out exactly how it is done, but haven't made any headway on it insofar. Does anyone have any idea how this was constructed? Here's the example website http://www

Work Around for Zend Date DST Bug

天大地大妈咪最大 提交于 2019-12-07 17:31:24
问题 I discovered a bug in Zend_Date when setting a time that crosses the DST change. Here's code that illustrates the problem: date_default_timezone_set('America/New_York'); echo '<pre>'; // DST BEGINS '2012-03-11 02:00:00' - "Spring Forward" $a = new Zend_Date('2012-03-11 00:00:00', 'yyyy-MM-dd HH:mm:ss'); $a->setTime('04:00:00', 'HH:mm:ss'); echo $a->toString('yyyy-MM-dd HH:mm:ss', 'iso') . ' // expected: 2012-03-11 04:00:00' . PHP_EOL; $b = new Zend_Date('2012-03-11 04:00:00', 'yyyy-MM-dd HH

zend framework sanitizing data

馋奶兔 提交于 2019-12-07 17:03:54
问题 I've seen different comments all over the place, some say that zend framework automatically sanitizes post/get data but others say it doesn't. What's the deal? I've seen that doing it in the predispatch with a foreach on getParams is the quickest way, but does anyone have any suggestions? 回答1: Probably the deal is about Zend_Controller_Request vs the Zend_Db . Request data are often put into the DB. Request object does not escape anything. You may force it to do using filters, form filters or

How to add CSS classes to Zend_Form_Element_Select option

六眼飞鱼酱① 提交于 2019-12-07 16:50:23
问题 I'm trying to add a CSS class to a Zend_Form_Element_Select option, but I just can't find a way to do it. The desired output would be something like this: <select name="hey" id="hey"> <option value="value1" style="parent">label1</option> <option value="value2" style="sibling">sublabel1</option> <option value="value3" style="sibling">sublabel2</option> <option value="value4" style="parent">label2</option> <option value="value5" style="sibling">sublabel3</option> <option value="value6" style=

Can't get message body of certain emails from inbox using the Zend framework?

半腔热情 提交于 2019-12-07 15:58:56
问题 Hi guys I'm trying to read through an email inbox for my application - I'm using the zend framework here. The problem is that I'm unable to retrieve the message body for certain emails. The following is my code as to how I'm doing this: $mail = new Zend_Mail_Storage_Imap($mail_options); $all_messages = array(); $page = isset($_GET['page'])?$_GET['page']:1; $limit = isset($_GET['limit'])?$_GET['limit']:20; $offset = (($page-1)*$limit)+1; $end = ($page*$limit)>$c?$c:($page*$limit); for ($i=

Zend framework outputting the letter 'f' onto my page

偶尔善良 提交于 2019-12-07 15:55:24
问题 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

Zend Framework: Application.ini what does resources.view[] = do?

泪湿孤枕 提交于 2019-12-07 15:50:14
问题 i am wondering what does adding ... resources.view[] = ... init application.ini actually do? i know it allows me to access the view from bootstrap by $this->bootstrap('view'); $view = $this->getResource('view'); but i wonder how does zf know resources.view = zend view? i guess doing that and accessing $view by getResource('view') will create a view initialized using the zend view plugin? if i dont add the line resources.view[] = my app still has a zend view right? so why is that line required