# Class AddressRuleContainer

Class AddressRuleContainer

  ObjRuleContainer uses PathableName, XmlConvertible
  AddressRuleContainer

Located at container-classes/AddressRuleContainer.php

Methods summary
`public` | # `__construct( mixed $owner )`
`public boolean` | # `addObject( `Address`|`AddressGroup` $Obj )` #### Parameters $Obj ``Address`|`AddressGroup`` $Obj #### Returns `boolean`
`public boolean` | # `API_add( `Address`|`AddressGroup` $Obj )` #### Parameters $Obj ``Address`|`AddressGroup`` $Obj #### Returns `boolean`
`public boolean` | # `remove( `Address`|`AddressGroup` $Obj, boolean $rewriteXml = TRUE, boolean $forceAny = FALSE )` #### Parameters $Obj ``Address`|`AddressGroup`` $Obj $rewriteXml `boolean` $rewriteXml $forceAny `boolean` $forceAny #### Returns `boolean` True if Zone was found and removed. False if not found. #### Overrides `ObjRuleContainer::remove()`
`public boolean` | # `API_remove( `Address`|`AddressGroup` $Obj, boolean $forceAny = FALSE )` #### Parameters $Obj ``Address`|`AddressGroup`` $Obj $forceAny `boolean` $forceAny #### Returns `boolean`
`public` | # `API_sync( )` #### Overrides `ObjRuleContainer::API_sync()`
`public` | # `setAny( )`
`public boolean` | # `has( `Address`|`AddressGroup`|string $object, mixed $caseSensitive = TRUE )` #### Parameters $object ``Address`|`AddressGroup`|string` $object can be Address|AddressGroup object or object name (string) $caseSensitive #### Returns `boolean` #### Overrides `ObjRuleContainer::has()`
`public `Address[]`|`AddressGroup[]`` | # `members( )` return an array with all objects return an array with all objects #### Returns ``Address[]`|`AddressGroup[]``
`public `Address[]`|`AddressGroup[]`` | # `all( )` return an array with all objects return an array with all objects #### Returns ``Address[]`|`AddressGroup[]``
`public` | # `rewriteXML( )`
`public` | # `toString_inline( )` #### Overrides `ObjRuleContainer::toString_inline()`
`public integer` | # `includedInIP4Network( string|`IP4Map` $network )` return 0 if not match, 1 if this object is fully included in $network, 2 if this object is partially matched by $ref. Always return 0 (not match) if this is object = ANY return 0 if not match, 1 if this object is fully included in $network, 2 if this object is partially matched by $ref. Always return 0 (not match) if this is object = ANY #### Parameters $network `string|`IP4Map`` $network ie: 192.168.0.2/24, 192.168.0.2,192.168.0.2-192.168.0.4 #### Returns `integer`
`public integer` | # `includesIP4Network( mixed $network )` return 0 if not match, 1 if $network is fully included in this object, 2 if $network is partially matched by this object. return 0 if not match, 1 if $network is fully included in this object, 2 if $network is partially matched by this object. #### Parameters $network `mixed` $network string|IP4Map ie: 192.168.0.2/24, 192.168.0.2,192.168.0.2-192.168.0.4 #### Returns `integer`
`public` | # `merge( mixed $other )` Merge this set of objects with another one (in paramater). If one of them is 'any' then the result will be 'any'. Merge this set of objects with another one (in paramater). If one of them is 'any' then the result will be 'any'.
`public boolean` | # `includesContainer( `AddressRuleContainer` $other, mixed $anyIsAcceptable = TRUE, mixed & $foundAddress = array() )` To determine if a container has all the zones from another container. Very useful when looking to compare similar rules. To determine if a container has all the zones from another container. Very useful when looking to compare similar rules. #### Parameters $other `mixed` $other $anyIsAcceptable `mixed` $anyIsAcceptable $foundAddress #### Returns `boolean` true if Zones from $other are all in this store
`public` | # `API_setAny( )`
`public string &` | # `getXPath( )` #### Returns `string`
`public boolean` | # `isAny( )` #### Returns `boolean`
`public boolean` | # `hasObjectRecursive( `Address`|`AddressGroup` $object, boolean $anyIsAcceptable = FALSE )` #### Parameters $object ``Address`|`AddressGroup`` $anyIsAcceptable `boolean` $anyIsAcceptable #### Returns `boolean`
`public boolean` | # `includesContainerExpanded( `AddressRuleContainer` $other, boolean $anyIsAcceptable = TRUE )` To determine if a store has all the Address from another store, it will expand AddressGroups instead of looking for them directly. Very useful when looking to compare similar rules. To determine if a store has all the Address from another store, it will expand AddressGroups instead of looking for them directly. Very useful when looking to compare similar rules. #### Parameters $other ``AddressRuleContainer`` $other $anyIsAcceptable `boolean` $anyIsAcceptable if any of these objects is Any the it will return false #### Returns `boolean` true if Address objects from $other are all in this store
`public `IP4Map`` | # `getIP4Mapping( )` #### Returns ``IP4Map``
`public` | # `copy( `AddressRuleContainer` $other )`
`public string[] &` | # `calculateZonesFromIP4Mapping( mixed & $zoneIP4Mapping, mixed $objectIsNegated = FALSE )` #### Parameters $zoneIP4Mapping `mixed` $zoneIP4Mapping array array of IP start-end to zone ie Array( 0=>Array('start'=>0, 'end'=>50, 'zone'=>'internet') 1=>... ) $objectIsNegated `mixed` $objectIsNegated bool IP4Mapping of this object will be inverted before doing resolution #### Returns `string[]` containing zones matched
`public `Address[]`|`AddressGroup[]` &` | # `membersExpanded( mixed $keepGroupsInList = FALSE )` #### Returns ``Address[]`|`AddressGroup[]``

Methods inherited from ObjRuleContainer
`API_replaceReferencedObject(), __destruct(), count(), display(), displayMembersDiff(), equals(), equals_fasterHash(), generateFastHashComp(), getAll(), getFastHashComp(), getItemAtPosition(), getMembersDiff(), hasObjectRegex(), name(), referencedObjectRenamed(), removeAll(), replaceReferencedObject(), setName()`

Methods used from PathableName
`(), (), ()`

Methods used from XmlConvertible
`(), (), (), ()`

Magic methods summary
`public mixed` | # `displayMembersDiff( `AddressRuleContainer` $otherObject = , mixed $indent = 0, mixed $toString = FALSE )` #### Parameters $otherObject ``AddressRuleContainer`` $otherObject $indent `mixed` $indent $toString `mixed` $toString #### Returns `mixed`

Properties summary
`public null|`AddressStore`` | $parentCentralStore | `null` | #

Properties inherited from ObjRuleContainer
`$name, $o, $owner`

Properties used from XmlConvertible
`$xmlroot`

Magic properties summary
`public `Rule`|`SecurityRule`|`NatRule`` | $owner | #

Magic properties inherited from ObjRuleContainer
`$fasthashcomp`

Magic properties used from PathableName
`$name`