zend

how to have two controller actions, one shared view for Zend_Controller_Action Class?

Hi Guys, How do you specify a custom view script for a given Controller Action method? For example: Class UserGalleryController extends Zend_Controller_Action { public function fooAction() { $this->view->actionMsg = 'foo'; // (uses foo.phtml automagically) } public function barAction() { $this->view->actionMsg = 'bar';...

Default modular directory structure for Zend Framework application

I'm aware of default directory structure for Zend Framework modular applications that is in the manual. /application /controllers /modules /admin /controllers /views /views /configs /www index.php But I'm wondering why should I do it this way. It really sux to have the default module in /application and othe...

Zend framework: Removing default routes

I'm using Zend FW 1.9.2, want to disable the default routes and supply my own. I really dislike the default /:controller/:action routing. The idea is to inject routes at init, and when the request cannot be routed to one of the injected routes it should be forwarded to the error controller. (by using the defaultly registere Zend_Control...

I am starting a new project with zend framework and would like some resources to help me.

Hello all I am starting a new project with my new employer. I am used to developing applications in Ruby on Rails. The team I am working with are more orientated to PHP and have decided they would like to use Zend framework for our new project. I am already reasonably familiar with PHP but not Zend. I am looking for any resources that ...

Regex for a-z , hypen (-) and å ä ö in Zend Route Regex

Hi! I want to route url through Zend route regex with Swedish character and here is my regex in xml configuration: ..... ([a-z\-å|ä|ö]+) ..... Still, the route doesn't behave as I expect. It doesn't redirect when the link contains å, ä, or ö I have tried to change to [a-zåäö\-]+ but it also gives the same result.. anyone can help? ...

How does Zend_Auth storage work?

This is very simple. I write $auth->getStorage()->write($user); And then I want, in a separate process to load this $user, but I can't because $user = $auth->getIdentity(); is empty. Didn't I just... SET it? Why does it not work? Halp? ...

array to Zend_Db_Table_Row zend framework

Hi, is there a way of automatic converting from array to Zend_Db_Table_Row or Zend_Db_Table_Rowset? Form Zend_Db_Table_Row you can get the array with toArray(), but I was wondering if there exits anything like opposite of that? Till now I have been implementing a function fill($data) which took the array and than set the atributes of Z...

How to check if a controller exists using Zend Framework

Hi all, I'm writing a plugin for my Zend Framework app and want to do a quick check to see if a controller exists. Can anyone point me in the right direction? ...

zend relationships with select

I am new to zend. I have been asked to redevelop a website that was once written in plain PHP and put it into the zend framework. I am having a lot of trouble with database relationships, I cant seem to get my head round defining and querying relationships. I would like to find a Category. From that Category I would like to be able to ...

How to dispatch url with subdomain in Zend PHPUnit Controller test?

I want to test my controller which works on subdomain www.username.domain.com The problem is when I dispatch in ControllerTestCase it throws Zend_Controller_Dispatcher_Exception routes.php: $userRouter = new Zend_Controller_Router_Route_Hostname(':user.domain.com')); $router->addRoute('user', $userRouter->chain(new Zend_Controller_...

Unit Testing With SimpleTest in PHP keeping getting file directory errors from relative paths?

I am using Zend Framework MVC and unit-testing with SimpleTest library. I have a specific model that keeps failing because it uses Zend Cache and the cache directory is a relative path I was wondering if anyone has seen a problem like this b4. Thanks. ...

Retrieve SSL Certificate with Zend Http Request and Response

I'm trying to connect to a third party API and I'm using the Zend 1.7.0 framework to access it. To authenticate, I have to first check an SSL certificate returned from a URL. This is what I'm doing in my code. $client = new Zend_Http_Client($url); $response = $client->request('GET'); The response is always OK, and when I navigate to...

Zend Framework : Setting up default values for part of the multicheckbox element options not possible

Hello, I'm writing this question cause I have difficulties setting up default values for a _MultiCheckbox element of a Zend Framework 1.9.3. I create Zend_Form_Element_MultiCheckbox with multiple options like this: $multiCheckbox = new Zend_Form_Element_MultiCheckbox( 'elId', array ( 'disableLoadDefaultDecorators' =>true ) ); $multiCh...

Cross Site Authentication and Zend Framework

I have been asked to implement a cross site login solution in Zend Framework. I have thought about perhaps using OpenID, are there any other solutions to make a login persist across many sites? In some ways a closed system hosted by us would suit better. ...

Linking a PHP Extension Written in C

Edit: Revising My Question When building an external PHP module in C, how do I link shared objects? ...

Sending variables to the layout in Zend Framework

Hi In my project I have a number of dynamic elements that are consistently on every page. I have put these in my layout.phtml My question is: How can I send variables into my layout from my controllers? If I want to send things from my controller I can use: $this->view->whatever = "foo"; And receive it in the view with echo $this-...

Implementation differences between Zend_Rest_Server & Zend_Rest_Controller

There seems to be two different ways in the Zend Framework to implement a RESTful API, one by adding objects&functions to the Zend Rest Server object inside a action controller, the other through extending the very sparsely documented Zend Rest Controller method mentioned in the Zend Rest Router configuration. My questions are: Do you...

Adding 3rd party library to ZendFramework

Hi there, my question is simple: How do I add an API and/or 3rd party library to my ZendFramework application in a way which makes it possible to access it in a controller ...

Zend Forms Module Include Paths

I'm using Zend 1.8.4 and setting up a simple form test. My form class is located in './application/forms/SectorSearch.php' and the class name is <?php class Form_SectorSearch extends Zend_Form {...} My controller creates a new form in the init() method <?php class SectorController extends Zend_Controller_Action { function init() ...

Is Zend Framework a total waste of my time?

Ok, I'm about 50% done with the "30 minute" quickstart guide from Zend. I must be missing something, because this seems like a total waste of time. The point of this quickguide is to create a guestbook, something I could do in 5 minutes with regular naked non-framework php. Here's my path to zend framework: c:/program files/wamp/www/_z...