Using PHP to Pubish eZPublish Content

Author Message

Deane Barker

Friday 20 June 2003 2:50:00 pm

(Note: I just found eZPublish today, so if this is painfully obvious to everyone else, just let me know.)

I want to use eZ for the admin side opf a site, but use traditional PHP on the publishing side. In other words, I want to make regular SQL SELECT calls against the eZ database to render pages.

To this end, I have created a function to get all the objects of a particular class, loop through them, and write their properties to a two-dimensional array:

So the function returns an array, and you do an array_shift through it, and refer to the properties like:

print $array["property_identifier");

The outside array will have one element for each object, and that element will have one element for each property.

You can view the code here:

http://www.deanebarker.net/Buildings.php.txt

I just wrote it in the last 15 minutes, so it's not perfectly clean or anything, and I'm recursing a SQL call, which I know is inefficient.

Am I on the right track with this? I have to believe that someone else has done this before.

Deane

Deane Barker

Friday 20 June 2003 3:57:13 pm

Um, yeah, well, I just found the PHP classes, so forget this posting was ever entered.

Sorry.

Deane

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 00:21:08
Script start
Timing: Jan 31 2025 00:21:08
Module start 'layout'
Timing: Jan 31 2025 00:21:08
Module start 'content'
Timing: Jan 31 2025 00:21:09
Module end 'content'
Timing: Jan 31 2025 00:21:09
Script end

Main resources:

Total runtime0.9022 sec
Peak memory usage8,192.0000 KB
Database Queries52

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0052 588.2344151.2109
Module start 'layout' 0.00520.0039 739.4453220.6875
Module start 'content' 0.00910.8921 960.13284,364.8047
Module end 'content' 0.90120.0009 5,324.93757.8438
Script end 0.9022  5,332.7813 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00370.4150160.0002
Check MTime0.00150.1658160.0001
Mysql Total
Database connection0.00090.094810.0009
Mysqli_queries0.811389.9203520.0156
Looping result0.00060.0637500.0000
Template Total0.849594.220.4247
Template load0.00230.253120.0011
Template processing0.847293.900020.4236
Template load and register function0.00160.172610.0016
states
state_id_array0.00140.154710.0014
state_identifier_array0.00120.138120.0006
Override
Cache load0.00190.2108200.0001
Sytem overhead
Fetch class attribute can translate value0.00190.213810.0019
Fetch class attribute name0.00310.346630.0010
XML
Image XML parsing0.00200.226010.0020
class_abstraction
Instantiating content class attribute0.00000.001340.0000
General
dbfile0.00220.2411160.0001
String conversion0.00000.001140.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