[fw-general] Zend_Server_Reflection
There seems to be a problem that I've found when brought up by someone on #zftalk. It seems that Zend_Server_Reflection has problems with the use of func_get_args() when there is an @param php doc stating extra params. Example: /** * Internally redirects one action to another * * @param string $action The new action to be redirected to * @param mixed Any other parameters passed to this method will be passed as * parameters to the new action. * @access public */ function setAction($action) { $this->action = $action; $args = func_get_args(); unset($args[0]); call_user_func_array(array(&$this, $action), $args); } Error msg: ( ! ) Fatal error: Call to a member function isOptional() on a non-object in Zend/Server/Reflection/Function/Abstract.php on line 346 --- http://www.spotsec.com SpotSec -- View this message in context: http://www.nabble.com/Zend_Server_Reflection-tf3822461s16154.html#a10821733 Sent from the Zend Framework mailing list archive at Nabble.com.
RE: [fw-general] dowload documentation / wiki
Yes, as Matthew indicated, the download tar/zip package of Zend Framework already includes the documentation. Look under the directory "/documentation/end-user". These are rendered as HTML, like the manual on the website. We have plans to make the documentation be a separate downloadable package, but currently it's part of the main download bundle. You can also check out the sources for the manual from subversion (or the nightly snapshot). These are in DocBook XML format and you can build them yourself using the Makefile provided. See instructions here: http://framework.zend.com/wiki/x/1g Regards, Bill Karwin > -Original Message- > From: frosty1 [mailto:[EMAIL PROTECTED] > > is there any way to download the documentations? i would > like to be able to refer to it offline.
RE: [fw-general] Zend_Filter_Input problem
Thanks for the issue report Jakub, I have logged it as http://framework.zend.com/issues/browse/ZF-1437 and I will begin working on it. Regards, Bill Karwin From: Jakub Podhorský [mailto:[EMAIL PROTECTED] Sent: Saturday, May 26, 2007 3:47 AM To: fw-general@lists.zend.com Subject: [fw-general] Zend_Filter_Input problem Hello, I've got one problem with Zend_Filter_Input and I don't know how to solve it. I have: '', 'email' => '[EMAIL PROTECTED]', 'message' => 'my long message' ); $filters = array( '*' => new Zend_Filter_StringTrim(), 'nick' => new Zend_Filter_StripTags() ); $validators = array('email' => array( new Zend_Validate_EmailAddress(), Zend_Filter_Input::ALLOW_EMPTY => true ), 'nick' => array( Zend_Filter_Input::PRESENCE => Zend_Filter_Input::PRESENCE_REQUIRED, Zend_Filter_Input::ALLOW_EMPTY => false ) ); $input = new Zend_Filter_Input($filters, $validators, $data); if ($input->hasInvalid()) { $message = $input->getMessages(); } ?> If I have empty string in nick field it can't pass but it doesn't work. I don't need to make any other validation on that field. Thanks for every help, Jakub Podhorský
Re: [fw-general] How to store and retrieve user preferences, anybody got a good strategy?
Hi! On 5/26/07, Codiac <[EMAIL PROTECTED]> wrote: (...) My gut feeling tells me I can use Zend_Registry, Zend_Session or Zend_Config to store and retrieve user preferences, but each of those components has it's advantages and disadvantages. As I said before user preferences range from presentation (view) preferences to data retrieval (model) preferences to .. We use Zend_Config to parse .ini files which are only related to the application itself - e.g. database settings, xmlrpc endpoints, credentials needed for the app and so on. They allow you to keep sections to override only certain settings - for example, the mail server may be different in production, but not the credentials - you can do all this in a single .ini file. Those settings are parsed the first time a user hits the site and either stored in the session (Zend_Session) so we don't need to parse at each request, or at least in the registry to allow easy access everywhere. I don't think .ini files are suitable for user preferences. Unless you have some that never change - but building an .ini file per user (or a single "giant" one) does not make you very flexible. In general the registry is "just" an alternative to $GLOBALS (roughly and very simple speaking). It allows you store data and retrieve it everywhere - you don't have to worry about $GLOBALS, or private etc.. But whatever you put in the registry is only available throughout the call and not persistant like a session. (Of course using a session doesn't free you from not keeping an eye on data and checking if it is still available, and so on.) So basically in regard to user preferences, I'd build my own backend for this. It pretty much depends on the options and the data in general you got there. A lazy approach is to save your preferences in an object/array, serialize and put it in a database. Then retrieve it on first request, parse and store them in the session for use. Hope that helps, Till
Re: [fw-general] dowload documentation / wiki
-- frosty1 <[EMAIL PROTECTED]> wrote (on Saturday, 26 May 2007, 07:07 AM -0700): > is there any way to download the documentations? i would like to be able to > refer to it offline. Documentation is currently provided with each release, and is also available in the repository. It is provided in docbook format, and needs to be compiled to HTML; there are instructions on how to do this on the wiki. -- Matthew Weier O'Phinney PHP Developer| [EMAIL PROTECTED] Zend - The PHP Company | http://www.zend.com/
[fw-general] dowload documentation / wiki
is there any way to download the documentations? i would like to be able to refer to it offline. -- View this message in context: http://www.nabble.com/dowload-documentation---wiki-tf3820659s16154.html#a10816670 Sent from the Zend Framework mailing list archive at Nabble.com.
[fw-general] How to store and retrieve user preferences, anybody got a good strategy?
Hi all, I'm looking for a good strategy how to store and retrieve user preferences with the current Zend Framework implementation. User preferences can range from which widgets to display on a page, to which data in a table must be displayed. I've been studying the literature and the best practice I'm came accros is using the Singleton design pattern (like Zend_Registry) to make sure there's only one object for the user preferences and preferable storing user preferences in session space (like Zend_Session). I must say that I couldn't find a good example or implementation where to put user preferences so I thought I consulted with the ZF community. My gut feeling tells me I can use Zend_Registry, Zend_Session or Zend_Config to store and retrieve user preferences, but each of those components has it's advantages and disadvantages. As I said before user preferences range from presentation (view) preferences to data retrieval (model) preferences to .. What do you think? Regards, T. -- View this message in context: http://www.nabble.com/How-to-store-and-retrieve-user-preferences%2C-anybody-got-a-good-strategy--tf3820508s16154.html#a10816251 Sent from the Zend Framework mailing list archive at Nabble.com.
[fw-general] Zend_Filter_Input problem
Hello, I've got one problem with Zend_Filter_Input and I don't know how to solve it. I have: '', 'email' => '[EMAIL PROTECTED]', 'message' => 'my long message' ); $filters = array( '*' => new Zend_Filter_StringTrim(), 'nick' => new Zend_Filter_StripTags() ); $validators = array('email' => array( new Zend_Validate_EmailAddress(), Zend_Filter_Input::ALLOW_EMPTY => true ), 'nick' => array( Zend_Filter_Input::PRESENCE => Zend_Filter_Input::PRESENCE_REQUIRED, Zend_Filter_Input::ALLOW_EMPTY => false ) ); $input = new Zend_Filter_Input($filters, $validators, $data); if ($input->hasInvalid()) { $message = $input->getMessages(); } ?> If I have empty string in nick field it can't pass but it doesn't work. I don't need to make any other validation on that field. Thanks for every help, Jakub Podhorský