summaryrefslogtreecommitdiffstats
path: root/public/settergetter.php
diff options
context:
space:
mode:
Diffstat (limited to 'public/settergetter.php')
-rw-r--r--public/settergetter.php26
1 files changed, 13 insertions, 13 deletions
diff --git a/public/settergetter.php b/public/settergetter.php
index 42cda16..f618eda 100644
--- a/public/settergetter.php
+++ b/public/settergetter.php
@@ -9,23 +9,23 @@
*
* General information about OpenSLX can be found at http://openslx.org/
*/
+
function print_a($v) {
echo"<pre style='background-color:#FFCC33'>"; print_r($v); echo"</pre>";
}
+
function setget($name) {
$withdash = $name;
$withoutdash = substr($name, 1);
return
- ' public function get'.ucfirst($withoutdash).'()
- {
- return $this->'.$withdash.';
-}
-public function set'.ucfirst($withoutdash).'($'.$withdash.')
-{
-$this->'.$withdash.' = $'.$withdash.';
-}
-';
+ 'public function get'.ucfirst($withoutdash).'() {
+ return $this->'.$withdash.';
+ }
+ public function set'.ucfirst($withoutdash).'($'.$withdash.') {
+ $this->'.$withdash.' = $'.$withdash.';
+ }';
}
+
if(isset($_POST['submit'])) {
$ar = explode("\n", trim($_POST['variables']));
@@ -41,11 +41,11 @@ else {
?>
Jeweils ein Variablenname pro Zeile :
- <br>
+ <br/>
<form method='post' action='<?php $_SERVER['PHP_SELF'];?>'>
- <textarea name='variables'>
- </textarea>
- <br> <input type='submit' name='submit'
+ <textarea name='variables'></textarea>
+ <br/>
+ <input type='submit' name='submit'
value='setter und getter generieren'>
</form>
<?php