Public Member Functions | |
| say ($strText) | |
| setName ($strName) | |
| buildHouse ($strType) | |
| getHouse () | |
| happyEverAfter () | |
| isEaten () | |
| isKilled () | |
| wakeUpBy (Wolf $objWolf) | |
Protected Attributes | |
| $strName | |
| $objHouse | |
Definition at line 14 of file Pig.class.php.
| buildHouse | ( | $ | strType | ) |
Make the Little Pig buid the house of the received type
| string | $strType type of the house |
Definition at line 60 of file Pig.class.php.
References $objHouse.
00061 { 00062 $objHouse = new House(); 00063 $objHouse->setType( $strType ); 00064 $this->objHouse = $objHouse; 00065 $this->objHouse->setPig( $this ); 00066 return $this; 00067 }
| getHouse | ( | ) |
| happyEverAfter | ( | ) |
Little Pig celebrate the happy ever after
Definition at line 83 of file Pig.class.php.
References say().
Referenced by wakeUpBy().
00084 { 00085 $this->say( "i am happy ever after!" ); 00086 }
| isEaten | ( | ) |
| isKilled | ( | ) |
| say | ( | $ | strText | ) |
The pig speak the received text
| string | $strText |
Definition at line 36 of file Pig.class.php.
References print.
Referenced by happyEverAfter().
00037 { 00038 print "pig say: " . $strText . "<br/>\n"; 00039 return $this; 00040 }
| setName | ( | $ | strName | ) |
Set the Little Pig name
| string | $strName |
Definition at line 48 of file Pig.class.php.
References $strName.
00049 { 00050 $this->strName = $strName; 00051 return $this; 00052 }
| wakeUpBy | ( | Wolf $ | objWolf | ) |
Little pig is wake up by the wolf
1. little pig kill the wolf 2. little pig is happy ever after
Definition at line 113 of file Pig.class.php.
References happyEverAfter(), and Wolf::isKilled().
00114 { 00115 $objWolf->isKilled(); 00116 $this->happyEverAfter(); 00117 }
$objHouse [protected] |
$strName [protected] |
1.5.9