From 67f79af21fcb3737c31980704569109d9c271fb7 Mon Sep 17 00:00:00 2001 From: Sebastian Schmelzer Date: Wed, 11 Jan 2012 16:10:33 +0100 Subject: cleanup --- public/settergetter.php | 55 +++++++++++++++++++++++++++---------------------- 1 file changed, 30 insertions(+), 25 deletions(-) (limited to 'public') diff --git a/public/settergetter.php b/public/settergetter.php index e18b643..42cda16 100644 --- a/public/settergetter.php +++ b/public/settergetter.php @@ -1,28 +1,30 @@ "; print_r($v); echo"";} +* This program is free software distributed under the GPL version 2. +* See http://gpl.openslx.org/ +* +* If you have any feedback please consult http://feedback.openslx.org/ and +* send your suggestions, praise, or complaints to feedback@openslx.org +* +* General information about OpenSLX can be found at http://openslx.org/ +*/ +function print_a($v) { + echo"
"; print_r($v); echo"
"; +} function setget($name) { $withdash = $name; $withoutdash = substr($name, 1); return - ' public function get'.ucfirst($withoutdash).'() - { - return $this->'.$withdash.'; - } - public function set'.ucfirst($withoutdash).'($'.$withdash.') + ' public function get'.ucfirst($withoutdash).'() { - $this->'.$withdash.' = $'.$withdash.'; - } - '; + return $this->'.$withdash.'; +} +public function set'.ucfirst($withoutdash).'($'.$withdash.') +{ +$this->'.$withdash.' = $'.$withdash.'; +} +'; } if(isset($_POST['submit'])) { $ar = explode("\n", trim($_POST['variables'])); @@ -36,13 +38,16 @@ if(isset($_POST['submit'])) { } else { - ? > - Jeweils ein Variablenname pro Zeile :
- < form method = 'post' action = '' > - < textarea name = 'variables' > - < / textarea >
- < input type = 'submit' name = 'submit' value = 'setter und getter generieren' > - < / form > - + + Jeweils ein Variablenname pro Zeile : +
+
'> + +
+
+