From fca04a6dab252eb9e8c0a92ce3b7e14b32e68d1e Mon Sep 17 00:00:00 2001 From: Sebastian Schmelzer Date: Wed, 11 Jan 2012 14:36:35 +0100 Subject: format source files --- public/index.php | 22 ++++++++--------- public/settergetter.php | 64 ++++++++++++++++++++++++------------------------- 2 files changed, 43 insertions(+), 43 deletions(-) (limited to 'public') diff --git a/public/index.php b/public/index.php index fe1701f..b12a55e 100644 --- a/public/index.php +++ b/public/index.php @@ -1,4 +1,4 @@ - null)); -else{ - Zend_Session::setOptions(array('cookie_lifetime' => null)); - Zend_Session::setOptions(array('gc_maxlifetime' => '1800')); +if(stristr($_SERVER['HTTP_USER_AGENT'], 'prebootGUI')) + { Zend_Session::setOptions(array('cookie_lifetime' => null)); } +else { + Zend_Session::setOptions(array('cookie_lifetime' => null)); + Zend_Session::setOptions(array('gc_maxlifetime' => '1800')); } // Run bootstrap $application->bootstrap() diff --git a/public/settergetter.php b/public/settergetter.php index 9b603d7..ac7ce8a 100644 --- a/public/settergetter.php +++ b/public/settergetter.php @@ -1,4 +1,4 @@ -";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.') - { - $this->'.$withdash.' = $'.$withdash.'; - } -'; +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.') + { + $this->'.$withdash.' = $'.$withdash.'; + } + '; } -if(isset($_POST['submit'])){ - $ar = explode("\n",trim($_POST['variables'])); +if(isset($_POST['submit'])) { + $ar = explode("\n", trim($_POST['variables'])); - $output = ""; - foreach($ar as $item){ - $output .= setget("_".trim($item)); - } - print_a($output); - echo "back"; + $output = ""; + foreach($ar as $item) { + $output . = setget("_".trim($item)); + } + print_a($output); + echo "back"; } -else{ -?> -Jeweils ein Variablenname pro Zeile:
-
'> -
- -
- + Jeweils ein Variablenname pro Zeile :
+ < form method = 'post' action = '' > + < textarea name = 'variables' > + < / textarea >
+ < input type = 'submit' name = 'submit' value = 'setter und getter generieren' > + < / form > +