|
Revision 117, 1.5 kB
(checked in by argh, 4 years ago)
|
Massive update of the examples collection; added the patExampleGen examples framework; commented all examples; reworked all the templates...
|
- Property svn:eol-style set to
native
- Property svn:keywords set to
Author Date Id Revision
|
| Line | |
|---|
| 1 |
<?php |
|---|
| 2 |
|
|---|
| 3 |
|
|---|
| 4 |
|
|---|
| 5 |
|
|---|
| 6 |
|
|---|
| 7 |
|
|---|
| 8 |
|
|---|
| 9 |
|
|---|
| 10 |
|
|---|
| 11 |
|
|---|
| 12 |
|
|---|
| 13 |
|
|---|
| 14 |
|
|---|
| 15 |
|
|---|
| 16 |
|
|---|
| 17 |
|
|---|
| 18 |
include_once 'patExampleGen/prepend.php'; |
|---|
| 19 |
$exampleGen->displayHead( 'Example' ); |
|---|
| 20 |
|
|---|
| 21 |
|
|---|
| 22 |
|
|---|
| 23 |
|
|---|
| 24 |
|
|---|
| 25 |
|
|---|
| 26 |
|
|---|
| 27 |
require_once $neededFiles['patForms']; |
|---|
| 28 |
|
|---|
| 29 |
|
|---|
| 30 |
|
|---|
| 31 |
|
|---|
| 32 |
require_once $neededFiles['patErrorManager']; |
|---|
| 33 |
|
|---|
| 34 |
|
|---|
| 35 |
|
|---|
| 36 |
$attributes = array( |
|---|
| 37 |
'required' => 'yes', |
|---|
| 38 |
'display' => 'yes', |
|---|
| 39 |
'edit' => 'yes', |
|---|
| 40 |
'label' => 'Username', |
|---|
| 41 |
'description' => 'Enter your username here.', |
|---|
| 42 |
'default' => 'Tom & Jerry', |
|---|
| 43 |
'title' => 'Username', |
|---|
| 44 |
|
|---|
| 45 |
|
|---|
| 46 |
|
|---|
| 47 |
$el = patForms::createElement( 'toXML', 'String', $attributes ); |
|---|
| 48 |
|
|---|
| 49 |
|
|---|
| 50 |
echo $el->getAttribute( 'label' )."<br>"; |
|---|
| 51 |
"<div>".$el->serialize()."</div>"; |
|---|
| 52 |
"<i>".$el->getAttribute( 'description' )."</i><br><br>"; |
|---|
| 53 |
|
|---|
| 54 |
|
|---|
| 55 |
$xml = $el->toXML( 'patForms' ); |
|---|
| 56 |
|
|---|
| 57 |
|
|---|
| 58 |
echo 'XML output:<br><br>'; |
|---|
| 59 |
$exampleGen->displayXMLString( $xml ); |
|---|
| 60 |
|
|---|
| 61 |
|
|---|
| 62 |
|
|---|
| 63 |
|
|---|
| 64 |
|
|---|
| 65 |
$exampleGen->displayFooter(); |
|---|
| 66 |
?> |
|---|