I tried what you said and it didn't work. I simplified it further and cut out
BaseForm and it still doesn't work: http://pastebin.com/m6568fed1


Also, class names are case INSENSITIVE. Try it out for yourself:

<?php
class Test {
        function __construct() {
                echo "hello<br />";
        }
}

$test = new Test();
$test2 = new test();
?>

That will come out "hello hello".

Here's a recent bug post for PHP 5.2.5: http://bugs.php.net/bug.php?id=44676

[9 Apr 7:35am UTC] [EMAIL PROTECTED]
> PHP is not case sensitive about classes names.
> 
> class foo{} 
> $a = new FOO();

Now, I do use "/privacy-policy" as the url, but "/privacypolicy" will throw
a Zend_View_Exception instead of
Zend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_CONTROLLER, which would
allow you to display your normal 404 page. It's not even a problem for me
since my staging and production servers are Linux, but don't deny that
there's a bug.


Matthew Weier O'Phinney-3 wrote:
> 
> -- KyleMac <[EMAIL PROTECTED]> wrote
> (on Wednesday, 02 July 2008, 02:12 PM -0700):
>> 
>> Here's a pastebin: http://pastebin.com/m75ddcc6b
>> 
>> BaseForm usually contains my standard decorators and so on, but I've
>> removed
>> all that to try and find the problem. AlnumExtra is my custom validator.
> 
> The problem is in your BaseForm class -- you never call
> parent::__construct(), and so the default paths are never setup
> correctly. Move that functionality into init(), and have your extending
> classes call parent::init() at the start of their init() methods.
> 
>> The case sensitivity problem is what I brought up here and exists in
>> 1.5+:
>> http://www.nabble.com/Mixed-case-controller-names-spaces-in-controller-names-to16886114.html#a16907959
>> 
>> Zend_Controller has been built on the assumption that PHP is case
>> sensitive
>> with class names, but PHP is not. Zend_Controller is in fact relying on
>> case
>> sensitivity from the file system, which NTFS doesn't have. So with ZF
>> 1.5+
>> on a Window servers, both /privacy-policy and /privacypolicy will load
>> the
>> PrivacyPolicyController.php but will fail loading the view folder.
> 
> So use /privacy-policy in the URL and not /privacypolicy. The second
> should map to PrivacypolicyController.php anyways, which should fail to
> load as class names are case SENSITIVE.
> 
> The easiest fix for case sensitivity is to use the appropriate URLs.
> 
> 
>> Matthew Weier O'Phinney-3 wrote:
>> > 
>> > -- KyleMac <[EMAIL PROTECTED]> wrote
>> > (on Wednesday, 02 July 2008, 01:20 PM -0700):
>> >> I just can't get custom validators to work properly. I want to be able
>> >> to use the validators in addElement with the shorthand name, i.e. just
>> >> "Regex".
>> >> 
>> >> The closet I can get to them working is:
>> >> 
>> >> $form->addElementPrefixPath('KM_Validate', 'Validate/',
>> >> Zend_Form_Element::VALIDATE);
>> >> 
>> >> But now none of the Zend validators work, for example: 'File
>> >> NotEmpty.php was loaded but class named KM_Validate_NotEmpty was not
>> >> found within it.' So it is still looking in Zend/Validate but is not
>> >> trying the correct class prefix.
>> > 
>> > Can you provide the full form definition, possibly in a pastebin
>> > somewhere? There are tests for this exact situation, and I've written
>> > applications and tutorials that do exactly this without any problems.
>> My
>> > inclination is that there is something else in your form definition
>> > causing problems.
>> > 
>> >> PS. Is the case sensitivity problem in Zend_Controller on NTFS going
>> >> to be fixed? If my production server ran Windows I'd consider it a
>> >> show stopper.
>> > 
>> > What case sensitivity issue are you referring to?
>> > 
>> > -- 
>> > Matthew Weier O'Phinney
>> > Software Architect       | [EMAIL PROTECTED]
>> > Zend Framework           | http://framework.zend.com/
>> > 
>> > 
>> 
>> -- 
>> View this message in context:
>> http://www.nabble.com/Zend_Form-addElementPrefixPath-disables-Zend-Validators-tp18245929p18246899.html
>> Sent from the Zend Framework mailing list archive at Nabble.com.
>> 
> 
> -- 
> Matthew Weier O'Phinney
> Software Architect       | [EMAIL PROTECTED]
> Zend Framework           | http://framework.zend.com/
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Zend_Form-addElementPrefixPath-disables-Zend-Validators-tp18245929p18247625.html
Sent from the Zend Framework mailing list archive at Nabble.com.

Reply via email to