[fw-general] Strageties for lost view vars when re-rendering an invalid form ?

2009-11-06 Thread J DeBord
Problem: When rendering an action's view script from a different action, the view variables that normally would exist are never initialized. For example, indexAction creates a form it's view script and at least one other variable for the view: public function indexAction() {

[fw-general] Premature end of script headers

2009-11-04 Thread J DeBord
I am intermitently getting the apache Premature end of script headers error. ZF 1.9 PHP 5.2.1 . Refreshing the page causes the site to function correctly. I was not familar with this error prior to a couple days ago, but from what I can understand, my php script is not completing correctly prior

[fw-general] Zend_Application Module Autoloader Configuration

2009-11-04 Thread J DeBord
Is there an option to create the default module autoloader when passing the config to Zend_Application's constructor as opposed to creating a function in the bootstrap? Instead of this: class Bootstrap extends Zend_Application_Bootstrap_Bootstrap { protected function _initAutoloader() {

Re: [fw-general] How to make a global Zend_Log with Zend_Application_Bootstrap

2009-10-23 Thread J DeBord
On Thu, Oct 22, 2009 at 7:29 PM, Jules Piccotti ju...@piccotti.it wrote: While I agree on Jurian's comment about the availability of a logger in most areas of a project, I don't think that any implementation should really take place in the models... Really? Could you say more about this? Do

Re: [fw-general] Exception with Zend_Amf problem

2009-10-21 Thread J DeBord
There is an open issue that seems to address what you are experiencing. http://framework.zend.com/issues/browse/ZF-5118 I have used Charles http://www.charlesproxy.com/ quite a bit to see the errors output by PHP. Also, I do believe the PHP error log will record the errors. 2009/10/22 Ondrej

[fw-general] Fwd: Zend_Measure Locale Exception

2009-10-19 Thread J DeBord
I'm pulling data from MySql and using it to create Zend_Measure objects. I'm using the Zend_Measure component from the svn trunk. I have a debian linux machine where the locale is set to en_US.UTF-8. This line of code works fine on the machine noted above: $duration = new

[fw-general] Zend_Measure undesired rounding when converting values

2009-10-14 Thread J DeBord
Zend_Measure_Length::convertTo rounds the values. I would like 2520 meters to be converted to 2.52 km, not 3 km. I'm storing distances as meters in a mysql database. I'm using Zend_Db to pull the values. I create a new Zend_Measure_Length object with the distance value from mysql typecast to an

Re: [fw-general] Zend_Measure undesired rounding when converting values

2009-10-14 Thread J DeBord
- From: J DeBord jasdeb...@gmail.com To: fw-general fw-general@lists.zend.com Sent: Wednesday, October 14, 2009 2:55 PM Subject: [fw-general] Zend_Measure undesired rounding when converting values Zend_Measure_Length::convertTo rounds the values. I would like 2520 meters to be converted

Re: [fw-general] Zend_Measure undesired rounding when converting values

2009-10-14 Thread J DeBord
as opposed to what might be preferable 10 min 30 secs (or something similar). Thanks again for your help. On Wed, Oct 14, 2009 at 7:51 PM, J DeBord jasdeb...@gmail.com wrote: On Wed, Oct 14, 2009 at 7:14 PM, Thomas Weidner thomas.weid...@gmx.atwrote: There is a known rounding failure by PHP

[fw-general] Zend_View_Helper_S3link proposal ready for review

2009-08-23 Thread J DeBord
I've completed the draft of my Zend_View_Helper_S3link proposal and added it to the ready for review list. Comments, advice, critiques, and suggestions are welcomed. Thanks! http://framework.zend.com/wiki/x/yIPt Jason DEBORD Limoges, France

Re: [fw-general] Zend_Validate_* Help

2009-08-22 Thread J DeBord
On Mon, Aug 17, 2009 at 9:24 PM, Shawn Iwinski (siwinski) siwin...@cisco.com wrote: I am having issues using the Zend_Validate_* classes. For all of the validation classes that I have been using, I have been getting an “Invalid type given, value should be float, string, or integer” error.

Re: [fw-general] Zend_View_Helper Supply constants to a view helper

2009-08-21 Thread J DeBord
On Fri, Aug 21, 2009 at 8:01 PM, Matthew Weier O'Phinney matt...@zend.comwrote: -- J DeBord jasdeb...@gmail.com wrote (on Friday, 21 August 2009, 06:44 PM +0200): What is the preferred approach to supply constant values to a View Helper? If a view helper requires configuration constants

[fw-general] Pre-Proposal Feedback Requested Zend_View_Helper_S3Link

2009-08-19 Thread J DeBord
A view helper that allows easy creation of Amazon Web Services S3 Query String Authentication urls. In short, query string authentication allows creation of URLS that can access private S3 objects which would otherwise require authentication. The created URLS have an expiration time. One use for

Re: [fw-general] Pre-Proposal Feedback Requested Zend_View_Helper_S3Link

2009-08-19 Thread J DeBord
Jason DEBORD Limoges, France http://nobrandapp.com/ On Wed, Aug 19, 2009 at 2:53 PM, Matthew Weier O'Phinney matt...@zend.comwrote: -- J DeBord jasdeb...@gmail.com wrote (on Wednesday, 19 August 2009, 02:25 PM +0200): A view helper that allows easy creation of Amazon Web Services S3 Query

Re: [fw-general] Best practice for configuration data

2009-08-17 Thread J DeBord
I'm just starting to figure out how Zend_Application works and I immediately had the same questions. If I move what was previously in my Zend_Config object stored in Zend_Registry to the application.ini file I use with Zend_Application, how can I access the values in the application.ini file.

Re: [fw-general] Best practice for configuration data

2009-08-17 Thread J DeBord
); } return $this-_config; } } What do you guys think of this approach? Thanks! On Mon, Aug 17, 2009 at 5:03 PM, J DeBord jasdeb...@gmail.com wrote: I'm just starting to figure out how Zend_Application works and I immediately had the same questions. If I move what was previously in my

Re: [fw-general] Zend_Filter_StripTags strips attributes even when told not to

2009-07-27 Thread J DeBord
is required for this adapter but the extension is not loaded Without magic_quotes_gpc = Off in the php.ini The above exception does not occur. I'm on a shared host. On Wed, Jul 15, 2009 at 4:47 PM, J DeBord jasdeb...@gmail.com wrote: Thanks again Matthew. I just downloaded ZF from the trunk and I am 99

Re: [fw-general] hosting suggestions with support for ZF

2009-07-26 Thread J DeBord
I'm in France and only have good things to say about : https://www.sharkspace.com/sharkcenter/aff.php?aff=023 They are located in the US. I've got 4 Zend Framework sites running on one hosting plan and have not had any problems. On Sat, Jul 25, 2009 at 10:27 PM, Peter Warnock

Re: [fw-general] Models as Singletons

2009-07-22 Thread J DeBord
When you see a method called getInstance(), is it assumed to be a singleton class. I don't think non singleton classes use or need to have a method called getInstance(). What are you trying to achieve with a static function that returns a new instance of the class that you can not or don't want to

[fw-general] Re: [fw-mvc] breakChainOnFailure

2009-07-20 Thread J DeBord
This may not be the answer you want to hear, but I think it would be ok to display either a 'field cannot be empty' or 'invalid entry' message next to the zip code form field if the state, country, etc is invalid. If someone enters 'lqsdkfj' for the state, the error message next to zip code, while

Re: [fw-general] Zend_Acl When / Where to check your ACL?

2009-07-17 Thread J DeBord
to extend a different base controller. I prefer doing it in a helper since I might want to have other logic in some of my controller hooks so I don't have to remember calling parent::init() or preDispatch(). -- Mon On Fri, Jul 17, 2009 at 12:59 PM, J DeBord jasdeb...@gmail.com wrote: 2009

Re: [fw-general] Zend_Acl When / Where to check your ACL?

2009-07-17 Thread J DeBord
to have other logic in some of my controller hooks so I don't have to remember calling parent::init() or preDispatch(). -- Mon On Fri, Jul 17, 2009 at 12:59 PM, J DeBord jasdeb...@gmail.com wrote: 2009/7/16 Vladas Diržys vladas.dir...@gmail.com Why an action helper, why not a plugin

Re: [fw-general] Zend_Acl When / Where to check your ACL?

2009-07-17 Thread J DeBord
am using Zend_Controller_Plugin_Abstract and registered in Bootstrap and works fine. function _initPlugins(){ Zend_Controller_Front::getInstance()-registerPlugin(new Plugin_ControllerAcl()); } Thanks *From:* J DeBord mailto:jasdeb...@gmail.com

[fw-general] Zend_Acl When / Where to check your ACL?

2009-07-16 Thread J DeBord
I created a front controller plugin for checking my ACL against the user's role. It first checks Zend_Auth for an identity. If an identity exists, it grabs the identity's role. If no identity exists, it uses 'guest' as the default role. I hooked into the preDispatch() method of the front

Re: [fw-general] Zend_Acl When / Where to check your ACL?

2009-07-16 Thread J DeBord
16, 2009 at 14:24, Matthew Weier O'Phinney matt...@zend.comwrote: -- J DeBord jasdeb...@gmail.com wrote (on Thursday, 16 July 2009, 09:30 AM +0200): I created a front controller plugin for checking my ACL against the user's role. It first checks Zend_Auth for an identity. If an identity

Re: [fw-general] Zend_Filter_StripTags strips attributes even when told not to

2009-07-15 Thread J DeBord
Form_NewMessage; $form-setAction('/messageboard/postnew/'); return $form; } Again, I really appreciate your help. Thanks! J On Tue, Jul 14, 2009 at 11:06 PM, Matthew Weier O'Phinney matt...@zend.comwrote: -- J DeBord jasdeb...@gmail.com wrote (on Tuesday, 14 July 2009, 08:29 PM

Re: [fw-general] Zend_Filter_StripTags strips attributes even when told not to

2009-07-15 Thread J DeBord
())) { $this-view-newMessageForm = $form; return $this-render('index'); } $values = $form-getValues(); Zend_Debug::dump($values); exit; Outputs: array(1) { [message] = string(27) This is alinked text/a. } On Wed, Jul 15, 2009 at 8:13 AM, J DeBord jasdeb...@gmail.com

Re: [fw-general] Zend_Filter_StripTags strips attributes even when told not to

2009-07-15 Thread J DeBord
other ideas? Thanks, Jason On Wed, Jul 15, 2009 at 2:09 PM, Matthew Weier O'Phinney matt...@zend.comwrote: -- J DeBord jasdeb...@gmail.com wrote (on Wednesday, 15 July 2009, 08:13 AM +0200): Thanks for the reply Matthew. I'm using 1.84 Still not working. After executing the code below

[fw-general] Zend_Acl::add() may not accept extended classes

2009-07-14 Thread J DeBord
I'm experimenting with Zend_Acl and even though what I am doing may not be the best way to go about hiding/displaying navigation, the error message below does not appear to be correct:* Catchable fatal error*: Argument 1 passed to Zend_Acl::add() must implement interface

Re: [fw-general] Zend_Acl::add() may not accept extended classes

2009-07-14 Thread J DeBord
notice that it implements Zend_Acl_Resource_Interface, but there is already a class called Zend_View_Helper_Navigation being loaded by the framework already right? Where is your custom code being stored? -ralph J DeBord wrote: I'm experimenting with Zend_Acl and even though what I am doing

Re: [fw-general] Zend_Acl::add() may not accept extended classes

2009-07-14 Thread J DeBord
Resource_Interfaces on my models, and do the acl checks. You could also do some kind of view iteration of the navigation object and then pass data into a custom built ACL, I would be interested to see if that kind of solution had merit. -ralph J DeBord wrote: Ahh, I did not realize

[fw-general] Zend_Filter_StripTags strips attributes even when told not to

2009-07-14 Thread J DeBord
I've tried to make StripTags leave the href attribute, but it strips it out. I can't find the right syntax or it just doesn't work. The a tag is left intact, every other tag is stripped, but the href and title get stripped as well. I've also used the fluid interface when adding the Textarea, but

Re: [fw-general] Front Controller Plugin or Action Helper

2009-07-13 Thread J DeBord
On Sun, Jul 12, 2009 at 11:20 AM, Rob Allen r...@akrabat.com wrote: On 12 Jul 2009, at 09:45, J DeBord wrote: I can code both of these, but I'm not sure what the correct method is. For recording hits to a website, which would you typically use? For checking if a Stay logged in cookie

[fw-general] Front Controller Plugin or Action Helper

2009-07-12 Thread J DeBord
I can code both of these, but I'm not sure what the correct method is. For recording hits to a website, which would you typically use? For checking if a Stay logged in cookie is set and logging the user in, which would you use? Thanks a lot! J

Re: [fw-general] Zend_Amf - Your opinion on a design idea

2009-07-03 Thread J DeBord
think it should work. Just want to get some opinions and more information before moving forward. Thanks. -Matt On Thu, Jul 2, 2009 at 1:24 AM, J DeBord jasdeb...@gmail.com wrote: We're in the design stage of an application that is going to use Adobe Flex / Actionscript for the front end

[fw-general] Zend_Amf - Your opinion on a design idea

2009-07-02 Thread J DeBord
We're in the design stage of an application that is going to use Adobe Flex / Actionscript for the front end and use AMF to communicate with the server. We need to control access and record information regarding each request made to the server. I am thinking about coding a class that recieves

[fw-general] Zend_Amf Unsupported Type Marker: 13 Please Help

2009-05-20 Thread J DeBord
I am making some progress with Zend_Amf, however, I am getting excpetions that don't seem to make any sense. When I attempt to send a value object with one attribute, it works. If I add attributes, I get an exception with an error such as Unsupported Type Marker: 13 How can I use this message to

[fw-general] Zend_Amf Map from Actionscript to PHP Assitance needed

2009-05-19 Thread J DeBord
I can send an object from the server to Flex with Zend_Amf. For example I can send an object from the server to Flex and it will map exactly as it should. When I attempt to send the same object from Flex to the server, I get the delivery in doubt error. I've been over the code and just can't

[fw-general] Zend_Amf Is setClassMap necessary?

2009-05-18 Thread J DeBord
Somehow I am under the impression that using $server-setClassMap() is not necessary if you use the $_explicitType var in you php class and you have added the correct directories to the $server. I am not experiencing this however. So, is setClassMap absolutely necessary? What is the best way to

[fw-general] Re: [fw-mvc] Finding the place for Zend_Amf in MVC

2009-05-13 Thread J DeBord
I'm not sure that a request object exists. Perhaps you could code your own. So far I've only been calling classes from flex and passing back objects to it. I think there is a lot more that can be done. If anyone else can chime in, that would be great. Or if there are any obscure resources out

[fw-general] Zend_Amf : Is AMFEXT Relevant?

2009-05-13 Thread J DeBord
For those of you that are more knowledgeable about AMF and how PHP handles it, take a look at this link and let me know if AMFEXT really does mae PHP's encoding and decoding of AMF 50 to 200 times faster like the second link claims. And if so, are there any drawbacks? And does it work with

Re: [fw-general] Zend_Amf: Method null does not exist

2009-05-12 Thread J DeBord
Hey Douglas, Thanks for posting this. Definitely could come in handy. If you know of any good resources for flex/Amf information, please let me know. Thanks again. J On Tue, May 12, 2009 at 7:47 PM, Douglas Pasqua douglas.pas...@gmail.comwrote: The following link has the solution for this

[fw-general] Zend_Amf Information needed

2009-05-11 Thread J DeBord
I'm interested in all the great Zend_Amf information that is out there. I've been over the devzone articles and they are great, but I'm looking for some more advanced stuff. I'm pretty clear on how a Flex application can call my php classes and get values returned to it. I'm not so clear as to

[fw-general] Zend_Autoloader_Resource and Zend_Amf_Server Not Playing Nice

2009-05-05 Thread J DeBord
The autoloading adventure continues... Using Zend_Autoloader_Resource is working great. Except for one thing: matching the namespaces up with Zend_Amf_Server My directory structure is the standard one. Here is some code: $loader = new Zend_Loader_Autoloader_Resource(array( 'basePath' =

Re: [fw-general] Zend_Loader_Autoloader match Zend_Loader functionality

2009-05-03 Thread J DeBord
a Model namespace by default in the /models directory. This is basically exactly what I'd like to do. Thanks, J Jason DEBORD Limoges, France http://www.jasondebord.net/ On Sat, May 2, 2009 at 9:48 PM, Mike Wright mike.wri...@mailinator.comwrote: Mike Wright wrote: J DeBord wrote: My code

Re: [fw-general] Zend_Loader_Autoloader match Zend_Loader functionality

2009-05-03 Thread J DeBord
sounded right to me, however it did not work. Thanks. J On Sun, May 3, 2009 at 2:25 PM, Matthew Weier O'Phinney matt...@zend.comwrote: -- J DeBord jasdeb...@gmail.com wrote (on Saturday, 02 May 2009, 07:43 PM +0200): My code: require_once 'Zend/Loader/Autoloader.php'; $autoloader

Re: [fw-general] Zend_Loader_Autoloader match Zend_Loader functionality

2009-05-03 Thread J DeBord
On Sun, May 3, 2009 at 5:14 PM, Matthew Weier O'Phinney matt...@zend.comwrote: -- J DeBord jasdeb...@gmail.com wrote (on Sunday, 03 May 2009, 04:49 PM +0200): Adding namespaces to the new Autoloader works great as long as they are in the include path. For example, a namespace 'App_' which

[fw-general] Zend_Loader_Autoloader match Zend_Loader functionality

2009-05-02 Thread J DeBord
To make Zend_Loader_Autoloader match the functionality of this: require_once Zend/Loader.php; Zend_Loader::registerAutoload(); Would you do this? : require_once 'Zend/Loader/Autoloader.php'; $autoloader = Zend_Loader_Autoloader::getInstance(); $autoloader-setFallbackAutoloader(true); Thanks!

Re: [fw-general] Zend_Loader_Autoloader match Zend_Loader functionality

2009-05-02 Thread J DeBord
accidentally use = in an associative array as opposed to = for example, I get the blank white screen instead of a parse error. Article was great. I'm going to keep plugging away. Thanks! On Sat, May 2, 2009 at 6:02 PM, J DeBord jasdeb...@gmail.com wrote: Thanks guys! I will be reading Matthew's

Re: [fw-general] Zend_Db_Table How best to associate an object with a db table?

2009-04-27 Thread J DeBord
of use. Extending Zend_Db_Table would be a bad idea. Karol J DeBord wrote: This may be partially a general oop question, but I hope someone can give me some advice. If you want to build a User object, what is the best way to store it's attributes? Would a user object extend

Re: [fw-general] Zend_Db_Table How best to associate an object with a db table?

2009-04-27 Thread J DeBord
(Zend_Db_Table_Row). You can expose its properties using __get/set for ease of use. Extending Zend_Db_Table would be a bad idea. Karol J DeBord wrote: This may be partially a general oop question, but I hope someone can give me some advice. If you want

[fw-general] Zend_Db_Table How best to associate an object with a db table?

2009-04-26 Thread J DeBord
This may be partially a general oop question, but I hope someone can give me some advice. If you want to build a User object, what is the best way to store it's attributes? Would a user object extend a Zend_Db_Table? Would you code a User class and have it interact with a UserTable extends

[fw-general] Zend_Form Sticky Form

2009-04-24 Thread J DeBord
Is there a method available to make Zend_Form sticky in the event it isn't valid? I came up with the code below, but couldn't determine if there was something already built in to Zend_Form for doing this. if (!$form-isValid($data)) { $elements = $form-getElements(); foreach ($elements

[fw-general] Zend Form Validators and their options

2009-04-22 Thread J DeBord
In the code below I have added the EmailAddress validator. In the case of this validator and the others, where can I find out what options I am able to pass to them? For example 'validators' = array(array('EmailAddress', false, array('WHAT OPTIONS CAN I PUT HERE?))), $this-addElement('text',

[fw-general] Re: Zend Form Validators and their options

2009-04-22 Thread J DeBord
Email address is required' , 'filters' = array('StringToLower'), 'class' = 'text' )); On Wed, Apr 22, 2009 at 8:50 AM, J DeBord jasdeb...@gmail.com wrote: In the code below I have added the EmailAddress validator. In the case

[fw-general] $this-addElement Validators with optional params ?

2009-04-21 Thread J DeBord
How would I set the optional value for the validator Alnum to true using the addElement syntax below? $this-addElement('text', 'l_description', array( 'decorators' = $this-_defaultDecorators, 'label'= 'Link Description', 'required'= false,

[fw-general] Zend_Translate and Routes

2009-04-20 Thread J DeBord
When using Zend_Translate, what is the best way to get the user's language preference? I have made a custom route '/:language/:controller/:action' and like the look of the url this creates. Then in my base controller, I get the language param and make sure it is one of the languages I have

[fw-general] Zend_Translate array adapter

2009-04-18 Thread J DeBord
When using the array adapter for Zend Translate is there any decrease in performance or other negative affects when building your arrays like this: ?php $navigation = array( 'Home' = 'Accueil', 'Menu' = 'Menu', 'Directions' = 'Directions', 'Contact' = 'Contact', ); $sidebar =

[fw-general] Zend Translate, Routes, and view-url()

2009-04-17 Thread J DeBord
I've been figuring out Zend_Translate today and have more or less got it working...I think... Can you guys help me with a few questions that have come up? First, to get Translate up and running, I put the following in my controller base class. One, Is the code ok? Two, should this be in the

Re: [fw-general] What is this: ?= $this-layout()-sidebar ?

2009-04-14 Thread J DeBord
accessing the model from your Layout Script or an ordinary view script (index.phtml for indexAction, etc.) If I am not on the right track, please advise. Cheers, J On Tue, Apr 14, 2009 at 1:49 PM, J DeBord jasdeb...@gmail.com wrote: That was great. Thanks for the article. So, as usual, I took one

Re: [fw-general] What is this: ?= $this-layout()-sidebar ?

2009-04-14 Thread J DeBord
, thanks a lot! J On Tue, Apr 14, 2009 at 5:06 PM, J DeBord jasdeb...@gmail.com wrote: I've been plugging away and I may have finally got it. Take this for example: I have a model that returns an array. I have a view helper that initializes the model and then calls for the model to return

Re: [fw-general] What is this: ?= $this-layout()-sidebar ?

2009-04-13 Thread J DeBord
Thanks for the replies. I created a SidebarController with a sidebarAction() function. In sidebar.phtml I have coded the template for my sidebar. Next, I registered this with the actionstack like this: $this-_helper-actionStack('nav', 'nav','default'); $this-_helper-actionStack('sidebar',

[fw-general] Dojo ValidationTextBox Invalid Message Display

2009-04-12 Thread J DeBord
Currently when an invalid value is entered, the ValidationTextBox changes color and displays a Caution sign graphic inside of it. The invalidMessage does not display until the user clicks inside the textBox. Is there anyway to cause the invalidMessage to display at the same time the Caution sign

[fw-general] What is this: ?= $this-layout()-sidebar ?

2009-04-12 Thread J DeBord
http://framework.zend.com/manual/en/zend.layout.quickstart.html#zend.layout.quickstart.example In the above link, what are ?= $this-layout()-nav ? and ?= $this-layout()-sidebar ? Are they view helpers? Would someone point me to a resource describing how to build one? For example, a template of a

[fw-general] Zend_Form_Element setErrorMessages

2009-03-13 Thread J DeBord
In the code below I have created a Form_Element for an email address and setRequired(true). I added the EmailAddress Validator. Goal 1: Instead of having the 5 or 6 default validation error messages possibily displayed I would like simply to say 'Your email address is invalid' when an invalid

[fw-general] HTML Tags and Zend Form

2009-03-12 Thread J DeBord
When using Zend_Form, is there a way to get rid of the default decorators all together? I read this article, but still do not understand how to change the html tags used to generate the form. http://devzone.zend.com/article/3450-Decorators-with-Zend_Form I would like the following HTML format:

[fw-general] Navigation view helper

2009-03-12 Thread J DeBord
I would like to add a navigation view helper to my layout.phtml Something along the lines of: ?= $this-layout()-nav; ? which would work like ?= $this-layout()-content ?, except common navigation would be displayed. I would then make two files, defaultNav.phtml and adminNav.phtml. I would like