House.class.php

Go to the documentation of this file.
00001 <?php
00014 class House
00015 {
00021     protected $strType;
00022 
00028     protected $objPig;
00029 
00035     protected $booIsColapsed = false;
00036 
00045     public function setType( $strType )
00046     {
00047         $this->strType = $strType;
00048         return $this;
00049     }
00050 
00058     public function getType()
00059     {
00060         return $this->strType;
00061     }
00062     
00068     public function colapse()
00069     {
00070         $this->booIsColapsed = true;
00071         return $this;
00072     }
00073 
00080     public function isColapsed()
00081     {
00082         return $this->booIsColapsed;
00083     }
00084     
00093     public function setPig( LittlePig $objPig )
00094     {
00095         $this->objPig = $objPig;
00096         return $this;
00097     }
00098 
00106     public function getPig()
00107     {
00108         return $this->objPig;
00109     }
00110 
00127     public function getBlowBy( Wolf $objWolf )
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     }
00139 }
00140 ?>

Generated on Sat Apr 7 14:19:11 2012 for CodeToDiagram by  doxygen 1.5.9