<?php
class Uzytkownik
{
private $Leniwy;
private $PotrafiKorzystacZGoogle;
private $JestNowy;
private $Dzieciak;
public function setLeniwy( $param = true )
{
$this -> Leniwy = $param;
}
public function setPotrafiKorzystacZGoogle( $param = true )
{
if ( $this -> Leniwy == true ) {
$this -> PotrafiKorzystacZGoogle = false;
} else {
$this -> PotrafiKorzystacZGoogle = $param;
}
}
public function setJestNowy( $param )
{
$this -> JestNowy = $param;
}
public function setNowyTemat( $trescTematu )
{
if ( $this -> PotrafiKorzystacZGoogle == true && $this -> Leniwy == false ) {
return false;
}
$olewamRegulamin = NULL;
$dopisekDoTematu = NULL;
if ( ! $this -> PotrafiKorzystacZGoogle ) {
$dopisekDoTematu .= "Tylko nie mowcie, zebym poszukal na GOOGLE, bo juz szukalem i NIC !! n";
}
if ( $this -> JestNowy ) {
$dopisekDoTematu .= "Jestem nowynn";
}
if ( $this -> JestNowy && $this -> Leniwy ) {
$olewamRegulamin = true;
}
if ( $this -> Leniwy ) {
$dopisekDoTematu .= "Na forum szukalem kilka godzin i nic nie znalazlem POMOZCIE !! PLISSSSnn";
}
if ( $this -> Dzieciak ) {
return $this -> zmienZapisNaZiomalski( $trescTematu . "nn" .$dopisekDoTematu );
} else {
return ( $trescTematu . "nn" .$dopisekDoTematu );
}
}
public function zmienZapisNaZiomalski( $param )
{
$jEsTKuL = NULL;
for( $i = 0; $i < strlen( $param ); $i ++ ) {
if ( $i % 2 ) {
} else {
}
}
return "eLO eLO ZiooOoOooOmY !!!nn" . $jEsTKuL;
}
public function setDzieciak( $param )
{
$this -> Dzieciak = $param;
}
}
$new = new Uzytkownik;
$trescTematu = "Mam na imie Wojtek, mam 13 lat i mam problem, mam skrypt i nie dziala mi, d
laczego!?!?!";
$new -> setDzieciak( true );
$new -> setJestNowy( true );
$new -> setLeniwy( true );
$new -> setPotrafiKorzystacZGoogle( false );
echo $new -> setNowyTemat
( $trescTematu );
/**
* WYNIK:
* eLO eLO ZiooOoOooOmY !!!
*
* mAm nA ImIe wOjTeK, mAm 13 LaT I MaM PrObLeM, mAm sKrYpT I NiE DzIaLa mI, dLa
CzEgO!?!?!
*
* TyLkO NiE MoWcIe, ZeByM PoSzUkAl nA GoOgLe, Bo jUz sZuKaLeM I NiC !!
* JeStEm nOwY
*
* nA FoRuM SzUkAlEm kIlKa gOdZiN I NiC NiE ZnAlAzLeM PoMoZcIe !! PlIsSsS
*/
?>
(IMG:
http://forum.php.pl/style_emoticons/default/winksmiley.jpg)
@Hacker - (IMG:
http://forum.php.pl/style_emoticons/default/winksmiley.jpg)