array fields in eZPersistentObject

Author Message

Marko Žmak

Wednesday 16 February 2011 9:42:14 am

First question: Can I use an array field in a class that extends eZPersistentObject and map it to a table column?

Judging from the code of ezpersistentobject.php it seems that it can be done by using "function_attributes", "functions" and "set_functions".

Second question: Can the array fields be used as the object's keys?

Again, by inspecting the code I see no reason why not.

--
Nothing is impossible. Not if you can imagine it!

Hubert Farnsworth

Marko Žmak

Wednesday 16 February 2011 4:38:27 pm

Further inspection leads to clear answers...

Firs: Yes.

Second: No.

--
Nothing is impossible. Not if you can imagine it!

Hubert Farnsworth

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 29 2025 23:52:02
Script start
Timing: Jan 29 2025 23:52:02
Module start 'layout'
Timing: Jan 29 2025 23:52:02
Module start 'content'
Timing: Jan 29 2025 23:52:03
Module end 'content'
Timing: Jan 29 2025 23:52:03
Script end

Main resources:

Total runtime0.8268 sec
Peak memory usage4,096.0000 KB
Database Queries52

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0045 588.1406151.2109
Module start 'layout' 0.00450.0023 739.351636.6719
Module start 'content' 0.00690.8189 776.0234433.1172
Module end 'content' 0.82580.0010 1,209.14067.8438
Script end 0.8267  1,216.9844 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00280.3349160.0002
Check MTime0.00120.1427160.0001
Mysql Total
Database connection0.00090.110110.0009
Mysqli_queries0.791895.7748520.0152
Looping result0.00040.0497500.0000
Template Total0.801797.020.4008
Template load0.00210.253520.0010
Template processing0.799696.708420.3998
Template load and register function0.00010.011110.0001
states
state_id_array0.00090.104710.0009
state_identifier_array0.00140.171120.0007
Override
Cache load0.00160.1880130.0001
Sytem overhead
Fetch class attribute can translate value0.00040.046110.0004
Fetch class attribute name0.00090.107530.0003
XML
Image XML parsing0.00060.069410.0006
class_abstraction
Instantiating content class attribute0.00000.001140.0000
General
dbfile0.00170.2021180.0001
String conversion0.00000.000740.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/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.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/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 8
 Number of unique templates used: 5

Time used to render debug report: 0.0001 secs