|
42 | 42 | * modern browser functionality with maximum client coverage.
|
43 | 43 | *
|
44 | 44 | * Comfort
|
| 45 | + * ------- |
45 | 46 | * - We abstract browser specifics from HTML-forms to provide a clean interface
|
46 | 47 | * to web developers. All configuration is located in one place.
|
47 | 48 | *
|
|
51 | 52 | * with JavaScript (client-side) or PHP (server-side).
|
52 | 53 | *
|
53 | 54 | * HTML5
|
| 55 | + * ----- |
54 | 56 | * - We follow the HTML5 spec where it's sensible. The only clash so far is
|
55 | 57 | * @link depage::htmlform::elements::multiple::htmlInputAttributes checkbox
|
56 | 58 | * validation @endlink .
|
57 | 59 | * - We aim to provide as much HTML5 functionality as possible.
|
58 | 60 | *
|
59 | 61 | * Customization
|
| 62 | + * ------------- |
60 | 63 | * - Input-elements can be easily modified by overriding the included
|
61 | 64 | * element-classes.
|
62 | 65 | * - New element-classes are automatically integrated by the autoloader. (They
|
63 | 66 | * can be instantiated with @link depage::htmlform::abstracts::container::__call
|
64 | 67 | * add @endlink (runtime generated methods))
|
65 | 68 | *
|
66 |
| - * @section prerequisites Developer Prerequisites |
67 |
| - * |
| 69 | + * Developer Prerequisites |
| 70 | + * ----------------------- |
68 | 71 | * - PHP 5.3
|
69 | 72 | * - PHPUnit 3.5 (to run included unit tests)
|
70 | 73 | * - Doxygen 1.7.2 (to generate documentation)
|
71 | 74 | *
|
72 |
| - * @section style Coding style |
73 |
| - * |
| 75 | + * Coding style |
| 76 | + * ------------ |
74 | 77 | * Generally, follow PSR-0, PSR-1, PSR-2 coding standard (http://www.php-fig.org)
|
75 | 78 | *
|
76 |
| - * @section Deployment |
77 |
| - * |
| 79 | + * Deployment |
| 80 | + * ---------- |
78 | 81 | * To generate a gzipped release of the library (includes examples):
|
79 | 82 | *
|
80 |
| - * <pre>$ make release</pre> |
| 83 | + * $ make release |
81 | 84 | *
|
82 | 85 | * To generate a gzipped release with the essentials for working environments:
|
83 | 86 | *
|
84 |
| - * <pre>$ make min</pre> |
85 |
| - * |
86 |
| - * @section Tests |
| 87 | + * $ make min |
87 | 88 | *
|
| 89 | + * Tests |
| 90 | + * ----- |
88 | 91 | * To run the unit tests:
|
89 | 92 | *
|
90 |
| - * <pre>$ make test</pre> |
91 |
| - * |
92 |
| - * @section Documentation |
| 93 | + * $ make test |
93 | 94 | *
|
| 95 | + * Documentation |
| 96 | + * ------------- |
94 | 97 | * To generate documentation:
|
95 | 98 | *
|
96 |
| - * <pre>$ make doc</pre> |
| 99 | + * $ make doc |
97 | 100 | **/
|
98 | 101 | // }}}
|
99 | 102 |
|
|
116 | 119 | * but also to also to @link depage::htmlform::elements::fieldset fieldsets@endlink
|
117 | 120 | * and @link depage::htmlform::elements::step steps@endlink:
|
118 | 121 | *
|
| 122 | + * These are the most used elements that are added to the form with the add-method: |
| 123 | + * |
| 124 | + * @link depage::htmlform::elements::text input[type=text] @endlink |
| 125 | + * |
| 126 | + * $form->addText('input', array('label' => 'Normal Input')); |
| 127 | + * |
| 128 | + * @link depage::htmlform::elements::email input[type=email] @endlink |
| 129 | + * |
| 130 | + * $form->addEmail('email', array('label' => 'Email Input')); |
| 131 | + * |
| 132 | + * |
| 133 | + * @code |
| 134 | + <?php |
| 135 | + $form = new depage\htmlform\htmlform('simpleForm'); |
| 136 | +
|
| 137 | + // some example inputs |
| 138 | + // @link depage::elements::text @endlink |
| 139 | + $form->addText('input', array('label' => 'Normal Input')); |
| 140 | + $form->addEmail('email', array('label' => 'Email Input')); |
| 141 | + $form->addEmail('url', array('label' => 'URL Input')); |
| 142 | + $form->addPassword('password', array('label' => 'Password Input')); |
| 143 | + $form->addDate('date', array('label' => 'Date Input')); |
| 144 | + $form->addNumber('number', array('label' => 'Number Input')); |
| 145 | + @endcode |
| 146 | + * |
119 | 147 | * @namespace depage::htmlform::exceptions
|
120 | 148 | * @brief Htmlform exceptions
|
121 | 149 | *
|
@@ -176,7 +204,7 @@ function autoload($class)
|
176 | 204 | // Display the form.
|
177 | 205 | echo ($form);
|
178 | 206 | }
|
179 |
| - ?> @endcode |
| 207 | + @endcode |
180 | 208 | *
|
181 | 209 | * You can find a list of available input-class in @link depage::htmlform::elements
|
182 | 210 | * elements@endlink.
|
|
0 commit comments