zend-framework

Zend Framework Project - Calendar: Need web calendar with events (like google calendar) for every user separately

Hi, I doing multi users website (it should works for more than 100,000 users) with Zend Framework. I need to create event calendar like google calendar (If it was possible to use google calendar i will do it- please tell me). I have to do that from zero or exist some good Calendar that will work well with Zend? Thanks ...

AJAX pagination in Zend Framework

How do you display AJAX paginated data using Zend_Framework? Are there any good examples using paginationControl(), ajaxLink() and ajaxContext() helpers? Would you share your implementation? ...

set/add view from controller action

Hi all, I'm trying to set a view script to be executed in addition to the currently requested action view script. I want to do this from the controller action itself in a way that this new view script output will be available from the layout $this->layout()->content helper. I found the setView() method but don't know how to use it from...

Zend Framework Response Filter to strip newlines and whitespaces between tags

I am wondering if there exists any filter/plugin which does the following to a zend framework response: Strip all unnecessary whitespaces from the HTML response Strip all newlines between tags which are not used (e.g. between ul -> li elements: IE6 design errors) Anyone know about something like that? thanks ...

How do I reuse code in Zend Framework

I am working on a web application which requires the user to login before they see or do anything. No part of this app should be accessible without being logged in. (Except of course, the login controller) Currently I am using sessions to handle the authentication and I have put code in each controller in the init() function to check i...

About unit testing a function in the zend framework and unit testing in general

Hello people, I am diving into the world of unit testing. And i am sort of lost. I learned today that unit testing is testing if a function works. I wanted to test the following function: public function getEventById($id) { return $this->getResource('Event')->getEventById($id); } So i wanted to test this function as follows: p...

Question regarding Ajax Hacking

All, I have a PHP website written in Zend Framework and MVC. Most of the controller actions check if the request is an Ajax request or not, else they redirect the user to home page. I am thinking about various ways to break that site. I am considering the following scenario: A user creates his own PHP project on his Local machine. Use...

Extended Zend_Db_Table_Row_Abstract does not return values

Hi, I'm quite new to Zend and the database classes from it. I'm having problems mapping a Zend_Db_Table_Row_Abstract to my rows. The problem is that whenever I try to map it to a class (Job) that extends the Zend_Db_Table_Row_Abstract class, the database data is not receivable anymore. I'm not getting any errors, trying to get data simp...

How to present a select type(drop down) in a tree view format in Zend_Form

Hello everyone, I am doing a new project in Zend and it needs a drop down which populates y the data from database (i.e Categories).I need to show those categories Data to be shown in the form of Tree view in the Drop Down menu.I have tried a bit doing it by just fetching the data from the database and then arranging them into the ZEND_F...

Zend Framework Route analog

This is a rails 3 code match '/articles(/:year(/:month(/:day)))' => 'posts#index'" that match url where some parts can be omitted to post controller and index action What is the most elegant way to make the same in Zend Framework ...

Need help with Zend Framework dynamic Namespaces

I want to make my system redirect unknown requests such as www.address.com/a_company to the adress www.address.com/companies/company/ and display the company a_company if it exists in the database, otherwise throw the user to a 404 not found page. So in detail, I want to make namespace that is as the first example dynamically, if the c...

Why are scripts given .phtml extension while working with zend framework?

Why are scripts given .phtml extension while working with zend framework? ...

Zend Framework: My custom form filter is not filtering!

So I have a form that is using a custom filter (which is really just a copy of Zend_Filter_Null). When I call it directly, it works: $makeZeroNull = new My_Filter_MakeZeroNull(); $null = $makeZeroNull->filter('0'); //$null === null However, when I try to add it to an element in my form, it doesn't filter the value when I call getValue...

Zend Framework: How to start PHPUnit testing Forms?

I am having trouble getting my filters/validators to work correctly on my form, so I want to create a Unit test to verify that the data I am submitting to my form is being filtered and validated correctly. I started by auto-generating a PHPUnit test in Zend Studio, which gives me this: <?php require_once 'PHPUnit/Framework/TestCase.php...

Zend Framework: How do I modify/format the form view generated with Zend_Dojo_Form elements

I have created a form: <?php class Application_Form_Issue extends Zend_Dojo_Form { public function init() { $this->setName('issue'); $this->setMethod('post'); $id = new Zend_Form_Element_Hidden('id'); $id->addFilter('Int'); $date_recvd = new Zend_Dojo_Form_Element_DateTextBox('date_recvd...

Location of DB models in Zend Framework - want them centralized

Maybe I've been staring at the problem too long and it's much simpler than I think, but I'm stuck right now. I have three websites that are going to share database models. I've structured my applications so that I have an application directory for each site and a public directory for each site. The DB models live in a directory in the...

XDebug not working with xampp

I'm using (or trying to anyway) use the bundled XDebug with XAMPP 1.7.2. It comes bundled with Apache 2.2.12, PHP 5.3.0, XDebug 2.0.5 and Zend (not sure on version) This is a totally fresh install of XAMPP, the only thing I've added to php.ini (at xampp/php/php.ini) is: zend_extension_ts = "C:\xampp\php\extensions\php_xdebug.dll" [xdeb...

Zend_Pdf how to set 595x842 image as a background of A4 pdf

I have an image with 595x842px dimensions, I would like to use the image as a background for a page in pdf. I want it to fill the whole background. How can I do that? I have this now: <?php error_reporting(E_ALL); set_include_path(get_include_path() . PATH_SEPARATOR . 'd:/data/o'); // Load Zend_Pdf class include 'Zend/Pdf.php'; // ...

"No such file or directory" SQLSTATE error using PHPUnit with XAMPP & Zend Framework

The error I'm getting is below. Zend_Db_Adapter_Exception: SQLSTATE[HY000] [2002] No such file or directory I've tried setting the xampp php to be the php in my PATH, hoping that it's a configuration file, but I had no luck with that. I'm not really sure why else it would say no such file or directory. Does anyone have any ideas? Up...

Zend_Pdf table?

Is it possible to create a table in Zend_Pdf? If yes, could you give me some code snippet? I've tried searching documentation and devzone but I couldn't find anything about adding tables to pdf. ...