UmlSequenceDiagramMessage.class.php

Go to the documentation of this file.
00001 <?php
00013 class UmlSequenceDiagramMessage
00014 {
00020     protected $strText = null;
00021 
00027     protected $strMethod = null;
00028 
00034     protected $strType = null;
00035 
00041     protected $objActorFrom = null;
00042 
00048     protected $objActorTo = null;
00049 
00055     protected $arrValues = Array();
00056 
00062     protected $intTimeStart;
00063 
00069     protected $intTimeEnd;
00070 
00077     protected $intPosition;
00078 
00084     protected $objUmlSequenceDiagram;
00085 
00093     protected $arrNotesBefore = array();
00094 
00102     protected $arrNotesAfter = array();
00103 
00112     public function setText( $strText )
00113     {
00114         $this->strText = $strText;
00115         return $this;
00116     }
00117 
00125     public function getText()
00126     {
00127         return $this->strText;
00128     }
00129 
00138     public function setMethod( $strMethod )
00139     {
00140         $this->strMethod = $strMethod;
00141         return $this;
00142     }
00143 
00151     public function getMethod()
00152     {
00153         return $this->strMethod;
00154     }
00155 
00164     public function setType( $strType )
00165     {
00166         if( !in_array( $strType, Array( 'call' , 'return' ) ) )
00167         {
00168             throw new Exception( "Invalid type of message " . $strType );
00169         }
00170         $this->strType = $strType;
00171         return $this;
00172     }
00173 
00181     public function getType()
00182     {
00183         return $this->strType;
00184     }
00185 
00193     public function getPosition()
00194     {
00195         return $this->intPosition;
00196     }
00197 
00205     public function setPosition( $intPosition )
00206     {
00207         $this->intPosition = $intPosition;
00208         return $this;
00209     }
00210     
00220     public function setActorFrom( UmlSequenceDiagramActor $objActor )
00221     {
00222         $this->objActorFrom = $objActor;
00223         return $this;
00224     }
00225 
00234      public function getActorFrom()
00235     {
00236         return $this->objActorFrom;
00237     }
00238 
00248     public function setActorTo( UmlSequenceDiagramActor $objActor )
00249     {
00250         $this->objActorTo = $objActor;
00251         return $this;
00252     }
00253 
00262      public function getActorTo()
00263     {
00264         return $this->objActorTo;
00265     }
00266 
00267 
00277     public function setUmlSequenceDiagram( UmlSequenceDiagram $objUmlSequenceDiagram )
00278     {
00279         $this->objUmlSequenceDiagram = $objUmlSequenceDiagram;
00280         return $this;
00281     }
00282 
00291      public function getUmlSequenceDiagram()
00292     {
00293         return $this->objUmlSequenceDiagram;
00294     }
00295 
00305     public function setValues( Array $arrValues )
00306     {
00307         $this->arrValues = $arrValues;
00308         return $this;
00309     }
00310 
00319     public function getValues()
00320     {
00321         return $this->arrValues;
00322     }
00323 
00335     public function addValue( UmlSequenceDiagramValue $objValue )
00336     {
00337         $this->arrValues[] = $objValue;
00338         return $this;
00339     }
00340 
00347     public function addNoteBefore( UmlSequenceDiagramNote $objNote )
00348     {
00349         $this->arrNotesBefore[] = $objNote;
00350         return $this;
00351     }
00352 
00359     public function setNotesBefore( array $arrNotesBefore )
00360     {
00361         foreach( $arrNotesBefore as $objNote )
00362         {
00363             $this->addNoteBefore( $objNote );
00364         }
00365         return $this;
00366     }
00367 
00373     public function getNotesBefore()
00374     {
00375         return $this->arrNotesBefore;
00376     }
00377 
00378 
00385     public function addNoteAfter( UmlSequenceDiagramNote $objNote )
00386     {
00387         $this->arrNotesAfter[] = $objNote;
00388         return $this;
00389     }
00390 
00397     public function setNotesAfter( array $arrNotesAfter )
00398     {
00399         foreach( $arrNotesAfter as $objNote )
00400         {
00401             $this->addNoteAfter( $objNote );
00402         }
00403         return $this;
00404     }
00405 
00411     public function getNotesAfter()
00412     {
00413         return $this->arrNotesAfter;
00414     }
00415 
00424    public function setTimeStart( $intTime )
00425     {
00426         $this->intTimeStart = $intTime;
00427         return $this;
00428     }
00429 
00437     public function getTimeStart()
00438     {
00439         return $this->intTimeStart;
00440     }
00441 
00450     public function setTimeEnd( $intTime )
00451     {
00452         $this->intTimeEnd = $intTime;
00453         return $this;
00454     }
00455 
00463     public function getTimeEnd()
00464     {
00465         return $this->intTimeEnd;
00466     }
00467 
00474     public function getTimeDuration()
00475     {
00476         return $this->intTimeEnd - $this->intTimeStart;
00477     }
00478 
00479 
00486     public function isReverse()
00487     {
00488         return ( $this->objActorFrom->getPosition() > $this->objActorTo->getPosition() );
00489     }
00490 
00491 
00498     public function isLarge()
00499     {
00500         return ( abs( $this->objActorFrom->getPosition() - $this->objActorTo->getPosition() ) > 1 );
00501     }
00502 
00509     public function isRecursive()
00510     {
00511         return( $this->objActorFrom->getPosition() == $this->objActorTo->getPosition() );
00512     }
00513 }
00514 ?>

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