zend-framework

Does the DataMapper pattern break MVC?

I have been reading up on multiple PHP frameworks, especially the Zend Framework but I am getting confused about the proper way to go forward. Zend Framework does not use ActiveRecords but instead uses the Table Data Gateway and Row Data Gateway pattern, and uses a DataMapper to map the contents of the Row Data Gateway to the model, bec...

How to rewrite domain in Zend Framework

I am writing a user registration form. After the user registers with a username e.g. "Billy", I would like him to use the url billy.mydomain.com to access the server. The Zend framework link of billy.mydomain.com is www.mydomain.com/profile/index/username/billy I would like to know how I can rewrite the url from www.mydomain.com/profil...

zend not using columns, and selecting everything

Hi, I have the following code $result = $handle->select()->from('store_details') ->where('store_details.store_id=?', $id) ->columns('store_details.store_name'); //->query(ZEND_DB::FETCH_OBJ); However, when I run it, the entire row is selecte...

How do I make all the times in the database etc be in UTC and the whole view part be in the local timezone?

From an E-Mail I get 'Sun, 21 Jun 2009 20:21:13 +0200' as the time how do I make strtotime output the universal time for it? which would be 18:21:13? I want to have the view part in UTC+2 (at least right now should follow :)). How do I achive this? ...

json problem (valums ajax uploader with zend framework)

Hi, I am using the ajax uploader and the Zend Framework. The Problem is when I am using the json response for the onSubmit. With $this->getHelper('Json')->sendJson($data); I only get a saveas dialog. The problem is that the uploader expects every responste to be "text/html" but the json helper sends "application/json" as mimetype. Wi...

Best way to implement multi-language in Zend Framework

What is the best way to implement multi-language support in the Zend Framework? I plan to use a separate language file for each language. Are there any other good approaches that I could look into? ...

Using Zend_File_Transfer to upload

Hi I've been using the Zend Framework rather intensively to develop my website, and I'm now designing the upload interface. I need to allow the user to upload 1-5 images. I need to send these images to the database as a BLOB object. My current code is something like this: $upload = new Zend_File_Transfer_Adapter_Http(); $upload->addVal...

Get Rss version by url in Php with Zend_Feed

I use Zend Framework to read an RSS feed is as simple as instantiating a Zend_Feed_Rss object with the URL of the feed : $feed = new Zend_Feed_Rss('http://rss.exemple.com/feed'); echo $feed->title(); This method doesn't exists echo $feed->version(); How I can get the version of Rss, like 2.0 or 0.92 ? ...

[Zend Framework] Best way to store user desired language

I am currently developing a multi-language site using Zend Framework. The system will pick a language for the user when he enters our site. If he doesn't like the language chosen by our system, he can choose another language. What is the best way to remember which language the user is chosen? ...

moving around uploaded files in PHP

Hi, I need to resize an uploaded image. The class that resizes needs to get the location of the image to be worked with. It returns the image in a variable. However, when I try to get the path to the image, I get from $_FILES['profile_upload']['tmp_name'] the following: C:\xampp\tmp\php1C5.tmp I don't get the actual file, even though t...

Zend Framework 1.8 Autoloading Zend_Gdata_YouTube VideoQuery.php

I'm having issues with Zend_Gdata_YouTube. It seems unable to locate the file VideoQuery.php despite the fact it is one of the directories mentioned in the warning messages. Also I created a standalone version of the example just including 'Zend/Gdata/YouTube.php'. This works fine. I've dropped the error messages then the class follo...

Zend selects all columns

In the following code: $selectColumns= array('user_id.user_email', // inner join the data from user_id and user_details 'user_details.first_name', 'user_details.last_name'); $result = $handle->select()->from('user_id', $selectColumns) ->where('user_id.uid=?', $uid) ...

Actionscript [Error #2036: Load Never Completed] with dynamic generated images

I'm working with an image caching system that generates different images based on a url route. The source images live outside the document root and cached versions are added to /cache in the webroot. Long story short, in Flash, if I point a Loader to the route, I get a "Load Never Completed" error the first time (if the cached image has ...

Zend_Feed Problem

//CODE $entries = $model->fetchEntries(); $feedUri = '/rss/'; //link from which feed is available $link = 'http://' . $_SERVER['HTTP_HOST'] . $feedUri; $feedArray = array( 'title' => 'Student\'s Movie Club - Upcoming Movies', 'link' => $link, 'description' => 'Upcoming Movies...

SOAP servers and clients with Zend framework (Getting errors)

I am testing a server and client i made on my webspace. when i try to call a simple "testServer" function defined in a ServerMap class, I get "Looks like we got no XML document" ..? I called getFunctions on the client and testServer is a valid function. I tried catching all exceptions and then calling __getLastResponseHeaders() and __...

Zend Many to Many Relationship

I want to retrieve all the data from 3 tables users , properties and users_properties. So I decided I would use the manytomanyRowset. But to my surprise I get the data from the properties and users_properties table but no data from the users table. Why is that? I need some columns from the users table is there a way to tell the manytom...

'Invalid controller specified' Since Moving to Modular Structure

I set up a Zend Framework application using Zend_Tool, but I wanted multiple modules (admin and default). I moved the controllers, models and views for default into modules/default, then created an admin module and some controllers. I then added this line to my config file to specify the modules directory: resources.frontController.modu...

Zend Framework Models

I'm trying to understand how the Zend Framework works.Are the models designed to do something like this?I have just a basic setup, so I can use in my controllers something like this: $db->query($this->selectAll()) Can you also give me an example on how to use this on a controller? class Country extends Zend_Db_Table { protected ...

How do you handle Zend_Paginator ?

I was looking at Zend_Paginator in Zend Framework project using MVC, and it looks like an intersting tool. It looks like we can give a select object as argument to the factory, it's interesting because it means that i should return a select object from my model, is it a good way to do ? It seems to be a bit heavy to do this, since it w...

Adding authentication functionality to soap server (Using Zend)?

I have a soap server that is created like so: class ServerController extends Zend_Controller_Action { public function serverAction() { memcache_flush(); Zend_Registry::get('cache')->clean(Zend_Cache::CLEANING_MODE_ALL); $server = new SoapServer("http://####/services/soap-server/wsdl"); $server->setCl...