How to validate input within extensions

Author Message

Norman Leutner

Friday 23 December 2005 12:13:51 am

I'm using the following code within my extension to store attributes:

      $contentObjectAttribute->SetAttribute( 'data_text', $data );
      $contentObjectAttribute->store();

Now I need to validate the input which was made in a form on the website.
Are there any standard functions to do that? (text, xml, images, ...)

Or will I have to programm them by myself?

Thanks in advance

Mit freundlichen Grüßen
Best regards

Norman Leutner

____________________________________________________________
eZ Publish Platinum Partner - http://www.all2e.com
http://ez.no/partners/worldwide_partners/all2e_gmbh

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

Main resources:

Total runtime1.5032 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.0068 589.1484152.6406
Module start 'layout' 0.00680.0034 741.789139.4766
Module start 'content' 0.01021.4914 781.2656468.8359
Module end 'content' 1.50160.0016 1,250.10168.1406
Script end 1.5032  1,258.2422 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00340.2275160.0002
Check MTime0.00130.0865160.0001
Mysql Total
Database connection0.00080.053110.0008
Mysqli_queries1.461397.2095460.0318
Looping result0.00080.0529440.0000
Template Total1.467697.620.7338
Template load0.00190.124220.0009
Template processing1.465897.507120.7329
Template load and register function0.00010.008410.0001
states
state_id_array0.00090.061110.0009
state_identifier_array0.00180.122520.0009
Override
Cache load0.00130.0883100.0001
Sytem overhead
Fetch class attribute can translate value0.00060.042410.0006
Fetch class attribute name0.00070.046120.0003
XML
Image XML parsing0.00070.044910.0007
class_abstraction
Instantiating content class attribute0.00000.000320.0000
General
dbfile0.00090.0629170.0001
String conversion0.00000.000640.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/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.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/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.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: 8
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs