[fw-general] Re: [PHP] Thank you everyone, What a wonderful world
> A six-to-one ratio of terrorists:civilians really is not that bad Ouch. -- Vianney Devreese - Lepidosteus http://lepidosteus.com
Re: [fw-general] Change delimiter for Zend Router
> But when i type www.mysite.com/home-usa-2008 > > I get the error : Uncaught exception 'Zend_Controller_Dispatcher_Exception' > with message 'Invalid controller specified (home-usa-2008)' Total guess: try removing the default routes before adding your own $router->removeDefaultRoutes(); $router->addRoute(... -- Vianney Devreese - Lepidosteus http://lepidosteus.com
Re: [fw-general] Zend_Cache: how much time left before expiration ?
I think you didn't get my question, maybe I didn't explain that well: When I use the core/file cache I give a lifetime to my cache records (it's in the zend_cache api), then it cleans it automagically when used if the lifetime is expired. What I want to know is if there is a way, when I successfully load a record, to know how much time it has left before it's "lifetime" expiration - not taking into account the fact that it could be manually blown away for one reason or another in the code. -- Vianney Devreese - Lepidosteus http://lepidosteus.com
[fw-general] Zend_Cache: how much time left before expiration ?
Hello, I didn't find anything in the docs, so here it is: is there any way using zend_cache (core, file) to know how much time a cached object you just loaded has left before expiring ? eg getting the X number in the following sample: $cache = getMyCache(); if (($someData = $cache->load('id')) { echo 'X minutes left before deletion'; } Thanks, -- Vianney Devreese - Lepidosteus http://lepidosteus.com
Re: [fw-general] Zend_Filters - Alnum
The easy answer is to have a look at the code: [...] $whiteSpace = $this->allowWhiteSpace ? '\s' : ''; if (!self::$_unicodeEnabled) { // POSIX named classes are not supported, use alternative a-zA-Z0-9 match $pattern = '/[^a-zA-Z0-9' . $whiteSpace . ']/'; [...] So yes, 'mypass_&231' would be filtered into 'mypass231' -- Vianney Devreese - Lepidosteus http://lepidosteus.com
Re: [fw-general] Problems with Zend_Cache & Xcache
No problem here with latest xcache and zf, using core and file -- Vianney Devreese - Lepidosteus http://lepidosteus.com
[fw-general] Re: [fw-mvc] Re: [fw-general] Zend_Form | Redirect to a different URL if the form is invalid
You could pass the session/cache id as a get parameter in the url but this allows easy session stealing -- Vianney Devreese - Lepidosteus http://lepidosteus.com
Re: [fw-general] Zend_Filter_Input and messages
I did not fully understand what you are trying to achieve here ? Do you try without success to change an error message ? To allow an empty value ? To disallow an empty value ? -- Vianney Devreese - Lepidosteus http://lepidosteus.com
Re: [fw-general] ZF performance advice
On 10/12/07, Matthew Weier O'Phinney <[EMAIL PROTECTED]> wrote: > First off, I've heard that eaccelerator and xcache's approaches to > opcode caching may not be terribly performant; switching to APC or Zend > Platform would likely help achieve better results. Don't know who said you that one, but he spoke without testing, it's quite fast to find benchmarks w/ google, and you will see that they all have somehow the same performance. But they *do* have different sets of features. -- Vianney Devreese - Lepidosteus http://lepidosteus.com
Re: [fw-general] Month difference between two dates in zend
On 9/4/07, Thomas Weidner <[EMAIL PROTECTED]> wrote: > See > > Zend_Date->getMonth() > or > Zend_Date->toValue('M'); > or > Zend_Date->toString('M'); > > Greetings > Thomas > I18N Team Leader I guess regarding the subject ("difference") he wants to knw how many month there are between two dates. Like how many month they are between 5/7/02 and 11/4/06 -- Vianney Devreese - Lepidosteus http://lepidosteus.com
[fw-general] Modular stucture and shared controllers ?
Hello, I'm using a modular system, with a "modules" directory in which i have them, each containing it's own "controller", "models" and "views" directory. So far everything is working great. Now I'm moving to zf 1.0 and I need to make the error controller. I'm not sure at how this would work: http://myhost.com/module/wrongcontroller/ will invoke "module" error controller ? Then what controller will be called if the user goes to http://myhost.com/wrongmodule/ ? And is there a way to regroup this error controllers ? What I would like to do is that, if the module is not correct, some error controller is called, but if the module is correct but not the controller, then another one is called the same whichever module you are in). Is it possible, and how may I achieve this ? -- Vianney Devreese - Lepidosteus http://lepidosteus.com
[fw-general] Re: Zend_Filter_Input 'missing' question
To add to my example, here are some part of the code and result: Zend_Debug::dump($_POST); gives: array(3) { ["analyse"] => string(3) "551" ["description"] => string(0) "" ["upload"] => string(16) "Poster le replay" } Zend_Debug::dump($input->getMissing()); gives: array(0) { } filters and validators arrays: $filters = array( 'description' => array('StringTrim', 'HtmlEntities'), 'upload' => 'StringTrim', 'whateverwrongvalue' => 'StringTrim', 'analyse' => 'Int' ); $empty_validator = new Zend_Validate_NotEmpty(); $empty_validator->setMessage( 'Ce champ est obligatoire, veuillez le remplir', Zend_Validate_NotEmpty::IS_EMPTY ); $between_validator = new Zend_Validate_Between(0, 1); $between_validator->setMessage( "'%value%' n'est pas une valeur compris entre '%min%' et '%max%' inclus", Zend_Validate_Between::NOT_BETWEEN ); $validators = array( 'description' => $empty_validator, 'upload' => $empty_validator, 'whateverwrongvalue' => $empty_validator, 'analyse' => array($between_validator, $empty_validator) ); -- Vianney Devreese - Lepidosteus http://lepidosteus.com
[fw-general] Zend_Filter_Input 'missing' question
Hello, I'm using a Zend_Filter_Input to get my data from the user. I'm not correctly understanding its behavior with missing fields (zf 1.0.0), here is some code: $filters = array( 'description' => array('StringTrim', 'HtmlEntities'), 'upload' => 'StringTrim', 'whateverwrongvalue' => 'StringTrim', 'review' => 'Int' ); $validators = array( 'description' => 'NotEmpty', 'upload' => 'NotEmpty', 'whateverwrongvalue' => 'NotEmpty', 'review' => array(array('Between', 0, 1)) ); $input = new Zend_Filter_Input($filters, $validators, $_POST); if ($input->hasInvalid() || $input->hasMissing()) { format_error_message($input->getInvalid(), $input->getMissing(), $input->getUnknown()); } I then create a form which contains all these fields except 'whateverwrongvalue' (aka, it should be reported as a missing field if I get it). Problem is, it isn't. If some field (say, 'description') is invalid, the 'if' fails and I get a valid error message etc ... But I never get anything about a missing field (unknown fields are reported the way they should be) Is it me misunderstanding the behavior or did I do something wrong ? -- Vianney Devreese - Lepidosteus http://lepidosteus.com
[fw-general] Zend studio and zend framework ?
Hello, I'm using zend studio (5.5) for my php programming, and I wanted to try the latest release release of the zend framework. I've updated my files in %Zend Studio directory%\bin\ZendFramework (I'm using the internal debugger). When debugging everything works fine, the framework is updated. My problem is about the code completion; while the new elements seems to be listed (zend_version and zend_loader are shown, for exemple), older (now non-existing) elements are still there. For exemple, the code completion still list the Zend class and it's method, which is a bit disturbing (in addition to being counter productive). Is there any think special to do to "refresh" the code completion of zend studio ? Thanks in advance -- Lepidosteus