zend-framework

Zend_Form_Element_Radio option label should not be escaped

I want to include some HTML in the labels of the radio buttons so that the user can click a link within that label. For example <label for="value-12"> <input name="value" id="value-12" value="12" checked="checked" type="radio"> Doo Bee Dooo Bee Doooo <a href="somelink">preview this song</a> </label> The html keeps getting ...

Finding if the current page is in a Zend Navigation object

I have more than one Zend_Navigation object in my application. I want to do a test to find out which object holds the page I'm currently on. I didn't see methods for doing that in the documentation. Can this be accomplished? How? Thanks! ...

How do I get secure AuthSub session tokens in PHP ?

I am using the Google/YouTube APIs to develop web application which needs access to a users YouTube account. Normal unsecure requests work fine and I can upgrade one time tokens to session tokens without any hassle. The problem comes when I try and upgrade a secure token to a session token, I get: ERROR - Token upgrade for CIzF3546351...

Instantiate dynamic array Magento

Kick me if I'm being silly but some some reason I'm having a heck of time building a dynamic array in magento. Example: $data = array(); $data[0] = 'test'; $data[1] = 'what'; I keep getting an ERROR: Notice: Undefined offset: 0 Any ideas? Do I need to handle these arrays differently since they are in a class? ...

Zend_Form - The mimetype of file 'foto.jpg' could not be detected

I have a Zend_Form with file element like this: ->addElement('file', 'image', array( 'required' => false, 'label' => 'Venue Image', 'validators' => array( array('IsImage', false), array('Size', false, '2097152'), array('Upload', false), ), )) And when I'm using lo...

resources.frontController.throwExceptions=1 does not generate exceptions

I'm setting resources.frontController.throwExceptions = 1 (or true) in my application.ini but that doesn't seem to force the FrontController to throw exceptions. I can see exceptions (output on the webpage) when I explicitly set 'protected $_throwExceptions = true;' in Front.php in Zend library. Any idea why the config setting doesn't w...

ext error with zend framework mvc

Hi, I am trying to setup ext javascript grid within zend framework mvc. I included ext css and js using the following code. $this->headScript() ->appendFile('/Resource/scripts/ext/jquery-1.4.2.js') ->appendFile('/Resource/scripts/ext/jquery/ext-jquery-adapter.js') ->appendFile('/Resource/scripts/ext/jquery/ext-all.js'); ...

Zend Framework :: extending action variable scope for partials

Hi, I want to know if there exist any other way through which we can access the controller name, action name and other variables inside a partial. In other words, I want to extend the scope of my action variable to be accessed inside the partial templates rather than passing the lot along with the call to partial template. Thanks -Dev...

Wamp Server: Multiple Virtual Hosts are not working on Windows.

I have two virtual hosts on windows(for example: test1.dev and test2.dev). But it always load content of test1.dev for both virtual hosts. Following are my files: hosts: 127.0.0.1 localhost 127.0.0.1 test1.dev 127.0.0.1 test2.dev httpd.conf: <IfModule ssl_module> SSLRandomSeed startup builtin SSLRandomSeed connect builtin ...

Pass a variable from postDispatch() to view instance in Zend Framework

I have a controller plugin with postDispatch() hook, and there I have a $variable. How to pass this variable to the view instance? I tried Zend_Layout::getMvcInstance()->getView(), but this returns new view instance (not the application resource). The same with $bootstrap->getResource('view'). I don't want to pass it as a request para...

What exactly is a framework? Like Zend Framework for PHP

I am new to coding and would just like to know a bit more about frameworks. How does a framework help you code and what exactly is it? Such as Zend for php. ...

Zend_Registry: real life examples

Do you find Zend_Registry useful? For which tasks it should be used? For which not? Global state for variables is not a good practice. Main objects may have global state injected via $front->setParam('paramName', $object), so what's the purpose of Zend_Registry?. ...

Zend_Filter_StripTags ignoring allowed tags and attributes

I'm trying to use the following code and it still strips out all the tags. Am I doing something wrong? I'm using the newest V1.10 $allowed_tags = array('img', 'object', 'param', 'embed', 'a', 'href', 'p', 'br', 'em', 'strong', 'li', 'ol', 'span'); $allowed_attributes = array('style', 'src', 'alt', 'href', 'width', 'height', 'value', '...

I want to build a custom router for Zend framework supports lang & country

Here is an example of what i want to do The Url will be as follow http://www.example.com/en/us/directory/companies/view/4433225.html Where is en: is the lang us: is the country directory: is the module companies: is the controller view: is the action 4433225.html: is sort of parameter send to the action could be the company name like th...

Handling Input with Zend Framework outside MVC

In a classic Zend Framework MVC setup, there seems to be access to a generic _request object from within the model/view/controller instance as outlined here: $this->_request->getPost('variablename'); is this request object somehow available in a non-MVC setup as well? If yes: how would I initialize and access it? ...

Different url scheme for Zend Framework

For our CMS we have a site manager that defines the site's tree structure (sitemap if you want to call it that). A possible url is www.example.com/our-team/developers/chris/ which would map in the tree structure to the node chris, child of developers which is in turn a child of out-team. All this is in place and working thanks to the w...

PHP / Zend Framework: Which object would handle a complex table join?

I think one of the more difficult concepts to understand in the Zend Framework is how the Table Data Gateway pattern is supposed to handle multi-table joins. Most of the suggestions I've seen claim that you simply handle the joins using a $db->select()... Zend DB Select with multiple table joins Joining Tables With Zend Framework PHP ...

Does Zend framework has a fix version of file structure?

As a newbie of Zend framework, I have a few version-dependent questions on the framework. Does Zend Framework has a fixed file structure (meaning a fixed form of file layout)? If so, does this file structure vary according to framework versions? If so, is there any reference to learn all the differences in file structure? ...

Zend Framework - Reading Application.ini values from a Controller

I am trying to store my Google Maps API Key in my application.ini file, and I would like to be able to read it from my controller whenever its needed. How can I go about reading values from the application.ini from my controller? Thanks! ...

Zend Mail sending with headers shown in body and header section in mail clients

I am using Zend Framework to send mail. It's doing something very odd, the content type, content dispostion, MIME version and content type encoding are all showing up in the header section (under the subject) of the email in GMail and in Outlook. The content of the email was also being included twice in the email, once as plain text an...