Question

I use Zend Framework and have the following custom file (this is the only file in this library!) in my own library (not de main ZF-library) :

/home/web/library/php/Zend/Form/Element/Xhtml.php

and my include path is:

/home/web/domains/secondstart/application/../../../library/php:/home/web/domains/secondstart/application/../library:.:/usr/local/zend/share/ZendFramework/library:/usr/local/zend/share/pear

The regular file is present in the ZF library (in /usr/local/zend/share/ZendFramework...).

Now in ZF the Zend_Form_Text_Element extends the Xhtml_Element as below (snippet):

...
require_once 'Zend/Form/Element/Xhtml.php';

/**
 * Text form element
 *
 * @category   Zend
 * @package    Zend_Form
 * @subpackage Element
 * @copyright  Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
 * @license    http://framework.zend.com/license/new-bsd     New BSD License
 * @version    $Id: Text.php 23775 2011-03-01 17:25:24Z ralph $
 */
class Zend_Form_Element_Text extends Zend_Form_Element_Xhtml
{
...

But my custom file is ignored when calling the Text_Element. When I remove the Xhtml.php file from the ZF library, it does pick my custom file. So it looks like the ZF regular library is preferred over my custom class despite my custom Zend Library being the first entry in my include path. Note that I have the exact same configuration in my development environment where it works as expected.

Any help as to why this happens and ca be avoided is greatly appreciated.

Some background: I do not like fiddling with external libraries but here it is really useful: I can break in into the internal Zend extension chain (to change the default decorators of Zend_Form_Element) an then let the ZF-library continue to do its brilliant work.

Was it helpful?

Solution

The issue was probably server side caching of code by zend server (CE). When I came back after lunch it worked as expected. I did eliminate browser caching by using Chrome incognito but forgot to think of server caching.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top