Home  PHP Projekte  PHP Schulung  Informationsquellen  Geschichte  Core PHP  Fortgeschrittenes PHP  Templates  Cache-Technologien  OOH Forms  Grundlagen  JavaScript  XML  XML Rumpf  XML Beispiel  Factory  Anwendungsbeispiel  XSLT  Layoutmanager  Pages  Wizards  Fazit  Technik der Site  Büchertipps  Fotografie  Airbrush  Kontakt  Stuff 
|
Anwendungsbeispiel
Die Benutzung der Factory ist sehr einfach,
weil es nur eine öffentliche Methode gibt, den Kontruktor.
Dieser erwartet als einzigen Parameter den Namen einer
XML-Datei.
| Anwendungsbeispiel XML Factory |
Top |
|
<?php require_once('HTML_OOH_Form/form_xmlfactory.php');
$f = new form_xmlfactory($DOCUMENT_ROOT . '/projekte/HTML_OOH_Form/examples/xml/form_text.xml'); print_r($f); ?>
|
|
Ausgabe
|
Top |
form Object
(
[defaults] => Array
(
[textsize] => 1
[textmaxlength] => 2
[filesize] => 3
[imageborder] => 4
[selectintro] => Array
(
[5] => intro
)
[selectintro_e] => Don't select me
[cssid] => id
[cssclass] => css class
[cssstyle] => style
)
[elements] => Array
(
[elname_text] => form_element_text Object
(
[optional_fields] => Array
(
[size] => integer
[length_e] => string
[minlength] => integer
[maxlength] => integer
[valid_e] => string
[valid_regex] => string
[valid_icase] => boolean
[readonly] => boolean
[tabindex] => integer
[accesskey] => string
[id] => string
[class] => string
[style] => string
)
[size] => 20
[length_e] => length_e
[minlength] => 1
[maxlength] => 4
[valid_e] => valid_e
[valid_regex] => [a-z]
[valid_icase] => 1
[readonly] =>
[accesskey] =>
[tabindex] => 0
[CR_HTML] =>
[CR_JS] =>
[exceptions] =>
[flag_config_ok] => 1
[elname] => elname_text
[name] => elnpname_text
[value] => default value
[additional_html] => additional html
[frozen] =>
[class] => css class
[id] => id
[style] => style
[shared_required_fields] => Array
(
[type] => string
[name] => string
)
[required_fields] => Array
(
)
[shared_optional_fields] => Array
(
[value] => mixed
[elname] => string
[additional_html] => string
[label] => string
[validator] => string
[validator_callback] => boolean
[js_validator] => string
[frozen] => boolean
[class] => string
[id] => string
[style] => string
)
[method] => POST
[val_events] => Array
(
[length] => 1
[valid] => 1
[intro] => 1
)
[js_mode] => strong
[form_name] => dojs
[validator] => callback
[validator_callback] => 1
[js_validator] =>
// must have the name of the (phpfunction)
function callback(form) {
// switch off length validaton
form.val_off("name_text", "l");
}
[label] =>
[type] => text
)
[submit] => form_element_submit Object
(
[optional_fields] => Array
(
[accesskey] => string
[tabindex] => integer
[width] => integer
[height] => integer
)
[width] => 1
[height] => 1
[CR_HTML] =>
[CR_JS] =>
[exceptions] =>
[flag_config_ok] => 1
[elname] => submit
[name] => elnpsubmit
[value] => [a-], 1-4 signs
[additional_html] =>
additional html
[frozen] =>
[class] => css class
[id] => id
[style] => style
[shared_required_fields] => Array
(
[type] => string
[name] => string
)
[required_fields] => Array
(
)
[shared_optional_fields] => Array
(
[value] => mixed
[elname] => string
[additional_html] => string
[label] => string
[validator] => string
[validator_callback] => boolean
[js_validator] => string
[frozen] => boolean
[class] => string
[id] => string
[style] => string
)
[method] => POST
[val_events] => Array
(
[length] => 1
[valid] => 1
[intro] => 1
)
[js_mode] => strong
[form_name] => dojs
[validator] =>
[validator_callback] =>
[js_validator] =>
[label] =>
[accesskey] =>
[tabindex] => 0
[type] => submit
)
)
[element_names] => Array
(
[elname_text] => elname_text
[submit] => submit
)
[element_prefix] => elnp
[validation_flags] =>
[validation_msg] =>
[hidden_elements] =>
[radio_elements] =>
[js_name] => dojs
[js_mode] => strong
[js_error_prefix] => There're errors in the form: \n\n
[js_error_postfix] => \n\nPlease correct the input.
[method] => POST
[flag_contains_file] =>
[action] => /schulung/ooh/xml/anwendung.php
[target] => _self
[additional_html] => Added in front of the closing form tag
[CR_HTML] =>
[CR_JS] =>
[exceptions] =>
)
|
|
|
< ^ >
|