zend-framework

Installing Aptana and Eclipse PDT - what should be main and what as a plugin

I would like to use an IDE for PHP Development using Zend framework & jQuery. I decided to use Aptana Studio. There is no PHP support in [Studio 2][2], so I have to use Eclipse PDF. My question is: Should I install Eclipse PDT first and the use Aptana as plugin or install Aptana Studio and then install Eclipse PDT as a plugin? What are ...

Zend OAuth with twitter single access tokens

Hey all, I'm developing an application where it requires users to sign in using twitter and OAuth. Everything works just fine thanks to Zend_OAuth. The problem is that the web app will also make some calls to the twitter API but these will be handled internally without the need of authenticating. Twitter Dev provides an 'access_token' a...

how to call multiple controller action from within any action in zend framework?

hi all, i have a controller action and i want it to be execute after any action. i have written an action helper with this method: public function postDispatch() { $actionstack = Zend_Controller_Action_HelperBroker::getStaticHelper('actionStack'); $actionstack->direct('myaction', 'mycontroller'); } but it seems that it stuc...

Referencing variable set by application in models (a good idea?)

i am using zend framework 1.10 with doctrine 2. i wonder if in my (doctrine) model class, isit a good idea to reference a variable set by my application (bootstrap.php, variable stored in Zend_Registry, i think its something like a global variable) what i want to access is the doctrine entityManager. also i want the id of the logged in...

Zend Framework - Regex Routes and Url View Helper Issue

Hi, I have this route setup in one of my bootstrap files... $route = new Zend_Controller_Router_Route_Regex( 'user/(\d+)', array( 'module' => 'user', 'controller' => 'view', 'action' => 'index' ), array( 1 => 'id' ), 'user/%d' ); $router->addRoute('user', $rou...

Zend_Gdata_Photos listing all albums and photos

I'm using the Zend_Gdata_Photos PHP client to access the Google Picasa API, trying to just do something very simple, list all the albums, and then list all the photos within each album. This is my code: $client = Zend_Gdata_ClientLogin::getHttpClient('*****', '*****', Zend_Gdata_Photos::AUTH_SERVICE_NAME); $gp = new Zend_Gdata_Photos($c...

Zend Framework: Using Dashes in Controller Names/URLs

I have a URL I would like to look something like http://server/my/action-name Obviously, I can't have a - in the ControllerName function and an underscore doesn't work. Is this even possible? ...

Sending the Variables from Layout to comtroller and view in zend framework

I have a php array defined in "layout" known as default.phtml and that array is some thing like this $mydata['abc'] = array("A","A","A","A","A","A","A"); I can get the Layout using a custom defined function $cls = new cass(); $layout = $cls->getLayout() ; How do i access the same array "$mydata['abc']" in the Controller and vie...

Zend Framework: Zend Form Select Generate Verbose HTML Using MultiOptions

I have a form that I am trying to add a simple select element to using the following php: $dateFormat = new Zend_Form_Element_Select('dateFormat'); $dateFormat->setLabel('Date Format:'); $dateFormat->setRequired(true)->addValidator('NotEmpty'); $dateFormat->addMultiOptions(array( 'MM/dd/yyyy' => "US S...

Integrating existing pages in a Zend Framework application

Hi, Is it possible to bypass any controller in a Zend Framework web site? Instead I want a normal PHP script executed and all its output should be placed in the layout/view coming from ZF: Request --> Execute PHP script --> Catch output --> Add output to view --> Send response The challenge is to integrate existing pages/scripts into ...

Bootstrapping Zend_Application with Zend_Test

in the docs the provided code for bootstrapping looks like protected $application; public function setUp() { $this->bootstrap = array($this, 'appBootstrap'); parent::setUp(); } public function appBootstrap() { $this->application = new Zend_Application( ... ); $this->application->bootstrap(); } i was curious why when i...

Creating a forum in Zend

I am new to this zend platform and i wish to develop a forum in zend. Can anyone please help me in developing the solution. Thanks in advance. ...

Problem with date, membership expired but it isn't yeat

Hi there, I need to modify my valid notification script (which notify members, before membership expiration, on expiration day and so on), to work on specific way. So my expires column in database (MySQL) is datetime type so value in it for example look like this: 2010-08-08 13:46:38 Here is a thing: Script can be called from backend...

Zend Framework store images in Module

I'm creating a weather module for an application that uses weather.com's xml service. With the license from weather.com you get a couple folders of images to use with their xml service. Is there an easy or better way to store the images in the module itself rather than the public folder of the app? ...

How to set default translator in configs.ini ?

Hi, I'm using Zend Framework 1.10.7 and I'm looking for a way to set the default translator. I know I could set it in Bootstrap.php but I would like to set it up in the configs.ini to gather most of my generic config. I guess it needs to specify a registry key (registry_key ?). By the way, does the Zend_Controller_Router use this defa...

Zend Db Table Abstract fetchRow add new objects to it

Hello my friends. I have a fetchRow, that is done like it: $db = new Database(); $data = $db->fetchRow($db->select()->where('id = ?',$id)); Done it, I would like to retrieve all the files from the file table, like this: $files = new Database(); $photos = $files->fetchAll($files->select()->where('id = ?',$data->id)); But it return...

How could I use a per module bootstrap ?

Hi, I'm using Zend Framework 1.10.7 and I'm looking for a way to use a per module bootstrap to set up specific module configuration. I thought it was as simple as extending the Zend_Appplication_Bootstrap_Bootstrap and put it at the root of the module directory, but it doesn't seem. Thank you. ...

Code coverage fails with PHPUnit and the Zend Framework

Hi I have some issues with code coverage reports in PHPunit and the zend framework. Whenever I run a phpunit test the code coverage fails returning the following message: PHPUnit 3.4.15 by Sebastian Bergmann. I.......III.I................................IIIIIIIIIIIIIII 60 / 93 IIII....I....I..II..II.....IIIIII Time: 4 seconds, Memo...

How to override native resources ?

Hi, I'm trying to create custom resource to extend existing zf resources. It works fine if I choose a different like 'Myrouter' as resource name but if I try to override Router it doesn't work. Here is my configs.ini (partial) autoloaderNamespaces[] = "Mlo_" autoloaderNamespaces[] = "My_" pluginPaths.Mlo_Application_Resource = APPLIC...

OpenID AX, Google and mod_rewrite problem

I am trying to implemented an OpenID for our project(Zend, PHP, Apache), and hitting a weird problem. After user authenticates at the provider's side and is sent back to our website, apache gives 500 Internal Server Error response. Logs are completely blank. I've noticed though that when using OpenID AX with Google, they returning way to...