Tuesday 23 August 2011 7:10:24 am
eZ 4.4 ÂÂÂ has to be used with PHP 5.2 at least. With the major version 5.3, namespaces became available in PHP. Unfortunatly we can't use them in eZ Publish.
Whether eZ Core classes use namespaces or not, developpers can't also use them whereas there isn't much to do to make namespaces available.
We only need to add few lines in the file 'kernel/private/classes/ezautoloadgenerator.php'. Using the php function token_get_all provides an array with parsed elements of the file.
For a namespace, PHP use the constant T_NAMESPACE. To ensure that our code is compatible in PHP 5.2, we need to define the constant in that version. To do such thing, we only need to add line 436 the following code :
Â
Then we get the namespace in the switch
Â
What do you think about it ?
No reply yet!
You must be logged in to post messages in this topic!
Timing: | Jan 18 2025 02:49:40 |
Script start | |
Timing: | Jan 18 2025 02:49:40 |
Module start 'layout' | |
Timing: | Jan 18 2025 02:49:40 |
Module start 'content' | |
Timing: | Jan 18 2025 02:49:40 |
Module end 'content' | |
Timing: | Jan 18 2025 02:49:40 |
Script end |
Total runtime | 0.0860 sec |
Peak memory usage | 4,096.0000 KB |
Database Queries | 53 |
Checkpoint | Start (sec) | Duration (sec) | Memory at start (KB) | Memory used (KB) |
---|---|---|---|---|
Script start | 0.0000 | 0.0059 | 589.3359 | 152.6250 |
Module start 'layout' | 0.0059 | 0.0022 | 741.9609 | 39.4531 |
Module start 'content' | 0.0081 | 0.0765 | 781.4141 | 392.4688 |
Module end 'content' | 0.0845 | 0.0015 | 1,173.8828 | 14.3984 |
Script end | 0.0860 | 1,188.2813 |
Accumulator | Duration (sec) | Duration (%) | Count | Average (sec) |
---|---|---|---|---|
Ini load | ||||
Load cache | 0.0031 | 3.5677 | 15 | 0.0002 |
Check MTime | 0.0012 | 1.3769 | 15 | 0.0001 |
Mysql Total | ||||
Database connection | 0.0008 | 0.9796 | 1 | 0.0008 |
Mysqli_queries | 0.0388 | 45.1067 | 53 | 0.0007 |
Looping result | 0.0004 | 0.4877 | 50 | 0.0000 |
Template Total | 0.0587 | 68.2 | 2 | 0.0293 |
Template load | 0.0024 | 2.7940 | 2 | 0.0012 |
Template processing | 0.0563 | 65.3916 | 2 | 0.0281 |
Template load and register function | 0.0001 | 0.1394 | 1 | 0.0001 |
states | ||||
state_id_array | 0.0006 | 0.6928 | 2 | 0.0003 |
state_identifier_array | 0.0011 | 1.2993 | 3 | 0.0004 |
Override | ||||
Cache load | 0.0019 | 2.2127 | 12 | 0.0002 |
Sytem overhead | ||||
Fetch class attribute name | 0.0014 | 1.6679 | 1 | 0.0014 |
class_abstraction | ||||
Instantiating content class attribute | 0.0000 | 0.0069 | 1 | 0.0000 |
General | ||||
dbfile | 0.0010 | 1.1378 | 10 | 0.0001 |
String conversion | 0.0000 | 0.0069 | 4 | 0.0000 |
Note: percentages do not add up to 100% because some accumulators overlap |
Usage | Requested template | Template | Template loaded | Edit | Override |
---|---|---|---|---|---|
1 | node/view/full.tpl | forum_topic/full.tpl | extension/community_design/design/suncana/override/templates/forum_topic/full.tpl | ||
1 | content/datatype/view/ezxmltext.tpl | <No override> | extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tpl | ||
2 | content/datatype/view/ezxmltags/paragraph.tpl | <No override> | extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tpl | ||
1 | content/datatype/view/ezxmltags/strong.tpl | <No override> | design/standard/templates/content/datatype/view/ezxmltags/strong.tpl | ||
1 | print_pagelayout.tpl | <No override> | extension/community/design/community/templates/print_pagelayout.tpl | ||
Number of times templates used: 6 Number of unique templates used: 5 |
Time used to render debug report: 0.0001 secs