Forums / Developer / How do I get modules to work in the real world?

How do I get modules to work in the real world?

Author Message

Stuart Fenton

Wednesday 13 August 2003 2:59:27 pm

I am writing a module based on the ez concept.

Specifically the content modules and the registration script.

1) Why does the $http->hasSessionVariable not always give you back what you asked? When is the right time to use this?

I noticed that your own modules use the $http->hasSessionVariable( "SomeID") to ensure that it is already used (and hence don't redo what is already done)

I have walked through the code with Zend to see this happening. However it is not always so; sometimes it comes back empty how is this possible?

2) I also noticed the the code seems to re-run over the same code multiple time, hence the necessity to store the variables otherwise you recreate stuff when you don't what to. Why does it do this and is their a faster way to do this to save processor cycles?

3) Why does it do this? Do I need to use the 'return;' at the right place?

4) How do I make my module work.? So far it works intermittently. Sometimes it works perfectly other time it makes multiple objects because the $http object fails to get the session variable.

5) Also I have come to understand that if I try to access an object while being in a handler then I only have access to the objects that are given to it not any other objects around it. Am I correct in this assumption?

For example:
function checkContentActions( &$module, &$class, &$object, &$version, &$contentObjectAttributes, $EditVersion, $EditLanguage )

This declaration would mean that the rest of the objects are invisible to the function so I cannot access them directly.

If I wanted to how could I do it?

Is their any higher/lower view documentation about how to use ez for development purposes rather that simply website development?

Waiting after much effort...

Fats.

-- Stuart

stuart@grandmore.com
http://www.grandmore.com