zend-framework

search good resources to implement memcached with doctrine 1.2 and zend framework

I search a good resources with examples to use a doctrine memcached and zend framework. i search in google but not found, i need resource that Combine all this things. using Doctrine_Cache_Memcache in zend framework. thanks ...

Zend Framework problem with Zend_Form_Element_File in a .ini form

The Zend_Form_File is generating an error: Warning: Exception caught by form: Method getImageValue does not exist Stack Trace: #0 /var/www/vhosts/mp3.al/library/Zend/Form/Decorator/Image.php(137): Zend_Form_Element->__call('getImageValue', Array) #1 /var/www/vhosts/mydomain.al/library/Zend/Form/Decorator/Image.php(137): Zend_Form_Elemen...

Warning: Cannot modify header information - headers already sent

I am getting this error: Warning: Cannot modify header information - headers already sent by (output started at E:\www\dev\elearning1\WebProjects\elearning\public\test.php:1) in E:\www\dev\elearning1\WebProjects\elearning\public\test.php on line 3 This is my entire PHP file: <?php header('Content-Type: text/html; charset=utf-8')...

Access Gmail Imap xoauth with google federated login access token

I am trying to implement google authentication on my site using the google federated login approach http://code.google.com/apis/accounts/docs/OpenID.html#oauth which combines openid and oauth together. I want to use the oauth access token generated via the above flow to access the gmail imap using oauth : http://code.google.com/apis/gmai...

zend framework components DB can't find class Zend_Paginator_Adapter_DbTableSelect

I'm using some Zend libraries outside of the Zend Framework in a small project. I'm using Zend_Db and Zend_Paginator but when I'm trying to set up the pagination using Zend_Paginator_Adapter_DbTableSelect I get an error that it can't find the class. Fatal error: Class 'Zend_Paginator_Adapter_DbTableSelect' not found in C:\xampp\htdocs\...

Is it possible to set a class on Zend MultiOptions?

I have a Zend_Form_Element_MultiSelect element. I would like the output to be something like this: <select id="users" multiple="multiple" name="users[]"> <option value="1" class="role-1">User 1</option> <option value="2" class="role-1">User 2</option> <option value="3" class="role-2">User 3</option> </select> Is there a way t...

how to write this query using zend framework?

Basically i need to have this query done through zend framework. SELECT k.id AS ID ,k.name AS NAME ,k.ppu_sell AS PRICE, k.type as TYPE FROM `inventory` as k UNION select m.id AS ID, m.name AS NAME, m.price AS PRICE, 'menu' as TYPE FROM menu as m ...

Zend Framework, Zend_Test & PHPUnit - Class Zend_Test_PHPUnit_ControllerTestCase could not be found

Hi I have been going mad with this, I have found some threads on this but none of them solve my problem. I have my bootstrap.php file for testing which looks like this define("PHPUNIT", true); require_once("/Applications/XAMPP/xamppfiles/htdocs/Common/test/public/index.php"); My index.php file does not call run() on the application ...

Custom View Helper vs Action View Helper in Zend Framework

Hi I was wondering when to call from the view a Custom View Helper like this one <?php class Zend_View_Helper_MyHelper { public $view; public function setView(Zend_View_Interface $view) { $this->view = $view; } public function myHelper() { return $this->view->escape(’This is being output from the custom helper <br />’); } } ?> and an...

Zend_Test - Setting redirect in Controller Plugin for PHPUnit

Hi I have been trying to use PHPUnit to test an application. I have it all working, but cannot test redirects. My redirects are occurring inside an Acl Controller Plugin, not inside an Action in a Controller. I have changed them to use the suggested format of $r = Zend_Controller_Action_HelperBroker::getStaticHelper('redirector'); $r...

findDependentRowset returning all rows

I have these two models: class Application_Model_List extends Zend_Db_Table_Abstract { protected $_name = 'list'; protected $_primary = 'list_id'; protected $_dependentTables = array('Application_Model_Task'); public function getUserLists($user) { $select = $this->select()->from($this->_name)->where('list_us...

Php framework to slowly refactor an inherited site

Hi, I've recently inherited a medium-sized php site which is horribly coded. It violates every best-practices methodology, from MVC to DRY, is vulnerable to SQL-injection and everything in between. I've visited the other questions and already put everything on a VCS and am considering the framework alternatives. However I'd like your ...

Call to unefined function db2_connect using zend

Warning: db2_connect() [function.db2-connect]: Statement Execute Failed on execution it showing warning. it showing line 65 and it is 'i5_naming' => DB2_I5_NAMING_ON, in zend studio when i look code it showing call to unidentified function on db2_connect. what are these options? i try to connectdirectly using db2_connect with ju...

How to extend a Zend Framework application to allow RESTful authentication?

I have a Zend Framework application that I am trying to tweak so I can use with an iPhone application. Everything in my ZF application requires that you are logged in first. In the browser you go to myapp.com/auth/login and get a login form. When you successfully authenticate, a cookie is set in order to remember that you are logged in...

Zend Framework: Meta attributes (keywords/description) from database

Hey, I am creating websites via Zend Framework and I've been wondering about this for quite some time now... Imagine that you have created the best articles module and you usually add meta_keywords/meta_description database entries per article, so that when the view renders it populates the meta fields in question with the data entere...

When to use Modules in Zend Framework ?

Hi, When setting up new ZF Projects i normaly have this directory structure: application modules default controller forms view models admin controller forms view models language shared models library public I use only modules when e.g the layout is diffrent, or a diffrent database is used, or of course when its a very spe...

Zend Search Lucene HTTP 500 Internal Server Error while bulk indexing on small tables

I am just getting started with Zend Search Lucene and am testing on a GoDaddy shared Linux account. Everything is working - I can create and search Lucene Documents. The problem is when I try to index my whole table for the first time I get a HTTP 500 Internal Server Error after about 30 seconds. If I rewrite my query so that I only s...

Zend_Test - Logging in and out different users for PHPUnit Testing

Hello A similar problem to mine is in this thread, but it doesn't use Zend_Session so is different from my issue. I have successfully got PHPUnit working using Zend Framework's ControllerTestCase class. I can log in a user and write successful tests for that log in, so that is fine: $this->request->setMethod('POST')->setPost(array('us...

Zend Framework correct naming convention for utilising configs from application.ini

Hi, I am using Zend_Oauth_Consumer which requires a number of config values to be passed. Currently i am passing an array into the constructor like so: $config = array( 'callbackUrl' => 'http://www.domain.com/twitter/callback', 'siteUrl' => 'http://twitter.com/oauth', 'consumerKey' => 'XXXXXXXXXXXXXXXXXX', ...

How to create a mock object of a doctrine entity?

Hi, I'm trying to write a unit test with phpunit for a model that uses doctrine 2. I want to mock the doctrine entities but I really don't have a clue of how to do this. Can anyone explain to me how I need to do this? I'm using Zend Framework. The model that needs to be tested class Country extends App_Model { public function find...