How to create content objects from PHP

Author Message

Alessandro Ranellucci

Friday 04 July 2003 3:46:21 pm

I need to create users from a PHP script. I guess I have to create a new content object of class "User" and populate it with attributes. Is there any code snippet on how to create a new content object?

Thank you.
--Alessandro.

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

Main resources:

Total runtime0.7664 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.0064 588.0313152.6406
Module start 'layout' 0.00640.0021 740.671939.4609
Module start 'content' 0.00850.7566 780.1328399.3203
Module end 'content' 0.76510.0012 1,179.45318.1563
Script end 0.7663  1,187.6094 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00330.4287160.0002
Check MTime0.00130.1726160.0001
Mysql Total
Database connection0.00110.146710.0011
Mysqli_queries0.725894.7070460.0158
Looping result0.00050.0686440.0000
Template Total0.728795.120.3644
Template load0.00240.306920.0012
Template processing0.726494.778620.3632
Template load and register function0.00010.016110.0001
states
state_id_array0.00110.144110.0011
state_identifier_array0.00080.100320.0004
Override
Cache load0.00190.243660.0003
Sytem overhead
Fetch class attribute can translate value0.00100.130810.0010
Fetch class attribute name0.00060.075410.0006
XML
Image XML parsing0.00010.015710.0001
class_abstraction
Instantiating content class attribute0.00000.000510.0000
General
dbfile0.00240.3172100.0002
String conversion0.00000.000940.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/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: 6
 Number of unique templates used: 5

Time used to render debug report: 0.0002 secs