zend-framework1.8

Is there a list of major OpenID providers URIs that ZF knows how to work with?

Is there a list of major OpenID providers URIs that ZF knows how to work with? ...

Get all modules, controllers and actions from a Zend Framework application

I want to create a Zend Controller for ACL management so my problem is: Howe can I get all Module names, Control names and Action names in a Zend application to build a ACL Control? I use Zend_Navigation and if the resource don't exist in your ACL Zend_Navigation is thrown a exception. And I want to use a database to deny and allow acce...

How to create the route with optional params? (ZF1.8)

The router $router->addRoute('catalogue', new Zend_Controller_Router_Route_Regex('(?:(uk|en)/)?catalogue/(.+)', array( 'language' => 'uk', 'module' => 'default', 'controller' => 'index', 'action' => 'catalogue' ), array(1 => 'language', 2 => 'param'), '%scatalogue/%s' )); When ...

adding a Route to the a Router in Zend Framework

I am using the mod-rewrite router. I am trying to add a Route to the router that will convert the following url: baseurl/category/aaa/mycontroller/myaction/param/value to be: Controller=mycontroller action=myaction --parameters-- category=aaa param=value I am using the following (not working) in my bootstrap, _front is the ...

How to specify a dynamic default for a key in a router, Zend Framework

This question is linked to this one How can I set the default of the category part to be the category value in the request url? $Router=$this->_front->getRouter(); $CategoryRoute = new Zend_Controller_Router_Route('category/:category/:controller/:action/*', array( 'controller' => 'index', ...

Is there a way to redirect the browser from the bootstrap in Zend Framework?

I need to redirect according to some conditions in the bootstrap file. It is done AFTER the front controller and routes are defined. How do I do that? (I know I can simply use header('Location: ....) The point is I need to use the Router to build the URL. ...

How do you solve the problems of URLs in a CSS file when using ZF?

I am using background images in my css, which, obviously, requires writing URLs in the css file. So, while the relative path might be the same, the base URL will be different between development and production. So, is there a better solution than: 1. changing it each time manually 2. using resources on the cloud with full URL 3. making t...

Is there a built in way in Zend-Form to hide the value of the SUBMIT input field?

If I build a form: $search_words = new Zend_Form_Element_Text('text'); $search_words->setRequired(true)->setDecorators(array(array('ViewHelper'))); $form->addElement($search_words); $go = new Zend_Form_Element_Submit('gogogo'); $go->setDecorators(array(array('ViewHelper'))) ->setIgnore(true); $form->addElement($go); ...

How to use different bootstraping for different modules in zend framework

I have two modules, default and mojo. After the initial bootstraping code which is the same for both of the modules, I want, for example, to use different layouts for each module (Or use different credentials check etc). Where do I put this: IF(module=='mojo') do this ELSE do that ...

Zend framework common code for all the controllers

I have a login button in the header of the website. This header's html is programmed into Zend framework views/layouts/home.phtml. I have a hidden form in this layout that is triggered by jQuery thickbox inline content display integration. Reason, I dont want to make a ajax call to just fetch a small login form. I create the form us...

How to apply stripslashes() to all form elements prior to output with Zend_Form

How do I apply stripslashes() to all form elements prior to output with Zend_Form? I have tried: //the filter class lib_filters_Stripslashes implements Zend_Filter_Interface{ public function filter($value){ return stripslashes($value); } } ... ... ... //In the form $form->setElementFilters(array(new lib_filters_Stripsla...

what is the best method to translate strings to mysql dates?

What is the best way in php to take the following string mm[some char]dd[some char]yyyy and translate it to yyyymmdd? I will probably want in the future, according to local do the same with dd[some char]mm[some char]yyyy. If there is a way that already uses the Zend Framework API, the better ...

What is the best way, inside a controller, to know if the request is a XMLHTTP one or not (ZF)

I have different logic in an action depends if the request is an AJAX one or not. (For AJAX logins, I do not need to redirect after successful login, which is not the case in normal login, for example). What is the best way, beside checking the headers for X-Requested-With: XMLHttpRequest Is there a flag or something? ...

How can I catch the controller/action values of a request before dispatch?

Zend Framework: I have the following url /base/url/[number]/[string] OR /base/url/action/controller/param/value I want in the case of /base/url/[number]/[string] to transform it to /base/url/controller/a/action/b/id/[number]/name/[string] The a and b are constants (i.e. each time I see a number in the place of...

How do I remove form attributes in Zend Framework?

I have a Form element: $Form=new Zend_Form; $Form->setAction($this->view->url(array('controller'=>'auth','action'=>'create'),null,true)) ->setMethod('post') ->setAttrib('id','auth-form') ->removeAttrib('enctype'); As can be seen I use the removeAttrib method to remove the default enctype. But, when I...

Best way to start using jQuery in a Zend Framework 1.9 application?

I want to get started working with jQuery in my Zend Framework application but not sure which is the best way to get started. I know I could include the jQuery library just like any other javascript library, but what are the advantages of using ZendX_JQuery, and what are the steps necessary to start using it in my Zend Framework 1.9 appl...

How to register Zend_Log in the bootstrap of a ZF 1.8+ application?

So I want to start logging in my Zend Framework application. I want to register the logger somewhere in my bootstrap so that I can easily access it from any controller action. I think this should be a simple thing that has been done before, but how can I do this? The documentation shows something like this, but I don't want to create a ...

Zend Framework: How and where to create custom routes in a 1.8+ application?

I've never created a custom route before, but I finally have a need for one. My question is: How can I create a custom route, and where should I create it? I'm using Zend Framework 1.9.6. ...

Cron Jobs in a Zend Framework 1.8+ application?

I am using Zend Framework 1.9.6. I want to start using cron jobs. I am new to this so I'm not quite sure how to do this. I'm thinking it would be a good idea to store my crons in /myapp/scripts or /myapp/application/cronjobs. What do you think? (my application only has a default module) Once I've decided on a place to store them, how w...

How to add a third-party Action Helper to a Zend Framework 1.8+ application?

I have downloaded a third party action helper that I would like to add to my application. How can I do this? ...