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

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 31 2025 04:30:44
Script start
Timing: Jan 31 2025 04:30:44
Module start 'layout'
Timing: Jan 31 2025 04:30:44
Module start 'content'
Timing: Jan 31 2025 04:30:45
Module end 'content'
Timing: Jan 31 2025 04:30:45
Script end

Main resources:

Total runtime1.2763 sec
Peak memory usage4,096.0000 KB
Database Queries46

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0051 588.2656151.2266
Module start 'layout' 0.00510.0028 739.492236.6797
Module start 'content' 0.00791.2673 776.1719864.9766
Module end 'content' 1.27520.0010 1,641.14847.8125
Script end 1.2762  1,648.9609 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00290.2302160.0002
Check MTime0.00120.0968160.0001
Mysql Total
Database connection0.00070.056510.0007
Mysqli_queries1.225496.0139460.0266
Looping result0.00040.0296440.0000
Template Total1.243697.420.6218
Template load0.00190.151020.0010
Template processing1.241697.286420.6208
Template load and register function0.00170.129810.0017
states
state_id_array0.00170.131410.0017
state_identifier_array0.00250.195520.0012
Override
Cache load0.00160.1239200.0001
Sytem overhead
Fetch class attribute can translate value0.00100.077510.0010
Fetch class attribute name0.00190.150820.0010
XML
Image XML parsing0.00250.197810.0025
class_abstraction
Instantiating content class attribute0.00000.000320.0000
General
dbfile0.00290.2261160.0002
String conversion0.00000.000840.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
2content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 7
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs