pass parameters to PHP function

Author Message

Amer Azzaz

Tuesday 13 December 2005 2:21:38 am

Hi , i created an extension and a modue displaydata and i have a problem in passing a prameter to a PHP function.
{def $val='xyz'}
{let names=fetch('displaydata','area',$val)}
....
In the function i got val is only 'x' ???!!!!!!! just one character is passed . Any idea ?

Bruce Morrison

Tuesday 13 December 2005 2:37:58 am

Hi Amer

The variables have to be in a hash. Try

{def $val='xyz'}
{let names=fetch('displaydata',hash('area',$val))}

Cheers
Bruce

My Blog: http://www.stuffandcontent.com/
Follow me on twitter: http://twitter.com/brucemorrison
Consolidated eZ Publish Feed : http://friendfeed.com/rooms/ez-publish

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 18 2025 22:11:22
Script start
Timing: Jan 18 2025 22:11:22
Module start 'layout'
Timing: Jan 18 2025 22:11:22
Module start 'content'
Timing: Jan 18 2025 22:11:22
Module end 'content'
Timing: Jan 18 2025 22:11:22
Script end

Main resources:

Total runtime0.5477 sec
Peak memory usage4,096.0000 KB
Database Queries54

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0068 589.0391152.6250
Module start 'layout' 0.00680.0036 741.664139.4453
Module start 'content' 0.01040.5356 781.1094520.6641
Module end 'content' 0.54600.0017 1,301.77348.1641
Script end 0.5477  1,309.9375 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00350.6407160.0002
Check MTime0.00140.2543160.0001
Mysql Total
Database connection0.00100.188410.0010
Mysqli_queries0.498591.0158540.0092
Looping result0.00060.1036520.0000
Template Total0.512693.620.2563
Template load0.00210.390920.0011
Template processing0.510493.188720.2552
Template load and register function0.00030.046010.0003
states
state_id_array0.00130.229010.0013
state_identifier_array0.00090.160920.0004
Override
Cache load0.00180.3247150.0001
Sytem overhead
Fetch class attribute can translate value0.00090.167020.0005
Fetch class attribute name0.00130.234130.0004
XML
Image XML parsing0.00130.239720.0007
class_abstraction
Instantiating content class attribute0.00000.002030.0000
General
dbfile0.00220.3964160.0001
String conversion0.00000.001740.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
2content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
2content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
3content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.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/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 11
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs