MapSection
Table of Contents
Methods
- __construct() : mixed
- add() : self
- getCode() : string
- getItems() : array<string|int, MapItem>
- getScope() : string
- getSimilarHash() : string
- Returns string that is associated with this object. Two strings will be equal if the object are similar
- has() : bool
- hasByCode() : bool
- isEqualTo() : bool
- Returns true if this MapSection is exactly the same as another MapSection.
- isSimilarTo() : bool
- Returns true if this MapSection represents the same section as another MapSection object.
- merge() : static
- Returns a new MapSection object that contains items from this and another section. Duplicates are skipped
- remove() : self
Methods
__construct()
public
__construct(string $scope, string $code) : mixed
Parameters
- $scope : string
- $code : string
add()
public
add(MapItem $item) : self
Parameters
- $item : MapItem
Return values
selfgetCode()
public
getCode() : string
Return values
stringgetItems()
public
getItems() : array<string|int, MapItem>
Return values
array<string|int, MapItem>getScope()
public
getScope() : string
Return values
stringgetSimilarHash()
Returns string that is associated with this object. Two strings will be equal if the object are similar
public
getSimilarHash() : string
Return values
stringhas()
public
has(MapItem $item) : bool
Parameters
- $item : MapItem
Return values
boolhasByCode()
public
hasByCode(string $mapItemCode) : bool
Parameters
- $mapItemCode : string
Return values
boolisEqualTo()
Returns true if this MapSection is exactly the same as another MapSection.
public
isEqualTo(static $anotherSection) : bool
Only contained data is taken into consideration. Two object could be equal even if they are the different instances, but contain the same data.
Parameters
- $anotherSection : static
Return values
boolisSimilarTo()
Returns true if this MapSection represents the same section as another MapSection object.
public
isSimilarTo(static $anotherSection) : bool
Two object can have different sets of items, but still represent the same section. Only aspects that matter are scope and code
Parameters
- $anotherSection : static
Return values
boolmerge()
Returns a new MapSection object that contains items from this and another section. Duplicates are skipped
public
merge(static $anotherSection) : static
Parameters
- $anotherSection : static
Tags
Return values
staticremove()
public
remove(MapItem $item) : self
Parameters
- $item : MapItem