Public Member Functions | |
| setType ($strType) | |
| getType () | |
| colapse () | |
| isColapsed () | |
| setPig (LittlePig $objPig) | |
| getPig () | |
| getBlowBy (Wolf $objWolf) | |
Protected Attributes | |
| $strType | |
| $objPig | |
| $booIsColapsed = false | |
Definition at line 14 of file House.class.php.
| colapse | ( | ) |
Make the house colapse
Definition at line 68 of file House.class.php.
Referenced by getBlowBy().
| getBlowBy | ( | Wolf $ | objWolf | ) |
Receive a blow from the wolf.
If the house has the type "Brick" the house dont colapse the the pig, owner of the house it is waked up by the wolf noise. But, if the house has not, the house colapse.
Return true if the house is colapsed and false if not
| Wolf | $objWolf |
Definition at line 127 of file House.class.php.
References colapse(), getPig(), getType(), and isColapsed().
Referenced by Wolf::blowIt().
00128 { 00129 if( $this->getType() == "Brick" ) 00130 { 00131 $this->getPig()->wakeUpBy( $objWolf ); 00132 } 00133 else 00134 { 00135 $this->colapse(); 00136 } 00137 return $this->isColapsed(); 00138 }
| getPig | ( | ) |
Get the little pig onwer of the house
House->objPig
Definition at line 106 of file House.class.php.
Referenced by Wolf::blowIt(), and getBlowBy().
| getType | ( | ) |
get the type of the house
House->strType
Definition at line 58 of file House.class.php.
Referenced by getBlowBy().
| isColapsed | ( | ) |
Return true if the house is colapsed and false if not
Definition at line 80 of file House.class.php.
Referenced by getBlowBy().
| setPig | ( | LittlePig $ | objPig | ) |
Set the little pig owner of the house
House->objPig
| LittlePig | $objPig |
Definition at line 93 of file House.class.php.
00094 { 00095 $this->objPig = $objPig; 00096 return $this; 00097 }
| setType | ( | $ | strType | ) |
Set the type of the house
House->strType
| string | $strType |
Definition at line 45 of file House.class.php.
References $strType.
00046 { 00047 $this->strType = $strType; 00048 return $this; 00049 }
$booIsColapsed = false [protected] |
$objPig [protected] |
$strType [protected] |
1.5.9