# Class AddressStore

© 2019 Palo Alto Networks, Inc. All rights reserved.

Licensed under SCRIPT SOFTWARE AGREEMENT, Palo Alto Networks, Inc., at https://www.paloaltonetworks.com/legal/script-software-license-1-0.pdf

  AddressStore uses PathableName

Located at object-classes/AddressStore.php

Methods summary
`public` | # `__construct( `VirtualSystem`|`DeviceCloud`|`DeviceGroup`|`Container`|`PanoramaConf`|`PANConf`|`FawkesConf`|null $owner )` #### Parameters $owner ``VirtualSystem`|`DeviceCloud`|`DeviceGroup`|`Container`|`PanoramaConf`|`PANConf`|`FawkesConf`|null` $owner
`public &` | # `getAddressStoreXPath( )`
`public &` | # `getAddressGroupStoreXPath( )`
`public` | # `load_addresses_from_domxml( `DOMElement` $xml )` For developer use only For developer use only #### Parameters $xml ``DOMElement`` $xml
`public `Address[]`|`AddressGroup[]`` | # `all( mixed $withFilter = null, boolean $sortByDependencies = FALSE )` Returns an Array with all Address , AddressGroups, TmpAddress objects in this store Returns an Array with all Address , AddressGroups, TmpAddress objects in this store #### Parameters $withFilter `mixed` $withFilter string|null $sortByDependencies `boolean` $sortByDependencies #### Returns ``Address[]`|`AddressGroup[]``
`public` | # `load_addressgroups_from_domxml( mixed $xml )`
`public boolean` | # `inStore( `Address`|`AddressGroup` $object )` returns true if $object is in this store. False if not returns true if $object is in this store. False if not #### Parameters $object ``Address`|`AddressGroup`` $object #### Returns `boolean`
`public` | # `count( )` This count all objects in the store, including Tmp,Address and Groups This count all objects in the store, including Tmp,Address and Groups
`public` | # `countAddressGroups( )`
`public` | # `countAddresses( )`
`public` | # `countTmpAddresses( )`
`public `Address`|`AddressGroup`|null` | # `find( string $objectName, `ReferenceableObject` $ref = null, boolean $nested = TRUE )` Should only be called from a CentralStore or give unpredictable results Should only be called from a CentralStore or give unpredictable results #### Parameters $objectName `string` $objectName $ref ``ReferenceableObject`` $ref $nested `boolean` $nested #### Returns ``Address`|`AddressGroup`|null`
`public` | # `findOrCreate( mixed $fn, mixed $ref = null, mixed $nested = TRUE )`
`public `Address`|null` | # `findTmpAddress( string $name, `ReferenceableObject` $ref = null, boolean $nested = TRUE )` #### Parameters $name `string` $name $ref ``ReferenceableObject`` $ref $nested `boolean` $nested #### Returns ``Address`|null`
`public` | # `displayTmpAddresss( )`
`public` | # `toString_inline( )`
`public boolean` | # `API_add( `Address`|`AddressGroup` $s )` #### Parameters $s ``Address`|`AddressGroup`` $s #### Returns `boolean`
`public boolean` | # `add( `Address`|`AddressGroup` $s )` #### Parameters $s ``Address`|`AddressGroup`` $s #### Returns `boolean` if object was added. wrong if it was already there or another object with same name. #### Throws ``Exception``
`public boolean` | # `API_remove( `Address`|`AddressGroup` $s, boolean $cleanInMemory = FALSE )` #### Parameters $s ``Address`|`AddressGroup`` $s $cleanInMemory `boolean` $cleanInMemory #### Returns `boolean`
`public boolean` | # `remove( `Address`|`AddressGroup` $s, boolean $cleanInMemory = FALSE )` #### Parameters $s ``Address`|`AddressGroup`` $s $cleanInMemory `boolean` $cleanInMemory #### Returns `boolean`
`public` | # `rewriteAddressStoreXML( )`
`public` | # `rewriteAddressGroupStoreXML( )`
`public `Address`` | # `newAddress( mixed $name, mixed $type, mixed $value, string $description = '' )` #### Parameters $name `mixed` $name string $type `mixed` $type string $value `mixed` $value string $description `string` $description #### Returns ``Address`` #### Throws ``Exception``
`public `Address`` | # `API_newAddress( mixed $name, mixed $type, mixed $value, string $description = '' )` #### Parameters $name `mixed` $name string $type `mixed` $type string $value `mixed` $value string $description `string` $description #### Returns ``Address`` #### Throws ``Exception``
`public `AddressGroup`` | # `newAddressGroup( string $name )` Creates a new Address Group named '$name' . Will exit with error if a group with that name already exists Creates a new Address Group named '$name' . Will exit with error if a group with that name already exists #### Parameters $name `string` $name #### Returns ``AddressGroup``
`public `AddressGroup`` | # `API_newAddressGroup( mixed $name )` Creates a new Address Group named '$name' . Will exit with error if a group with that name already exists Creates a new Address Group named '$name' . Will exit with error if a group with that name already exists #### Parameters $name `mixed` $name string #### Returns ``AddressGroup``
`public `AddressGroup[]`` | # `addressGroups( mixed $sortByDependencies = FALSE )` Returns an Array with all AddressGroup in this store. Returns an Array with all AddressGroup in this store. #### Returns ``AddressGroup[]`` #### Var bool $sortByDependencies
`public `Address[]`` | # `addressObjects( )` Returns an Array with all Address object in this store (which are not 'tmp'); Returns an Array with all Address object in this store (which are not 'tmp'); #### Returns ``Address[]``
`public `Address[]`|`AddressGroup[]`` | # `nestedPointOfView( )` #### Returns ``Address[]`|`AddressGroup[]``
`public `Address[]`|`AddressGroup[]`` | # `nestedPointOfView_sven( )` #### Returns ``Address[]`|`AddressGroup[]``
`public `Address`` | # `createTmp( string $name, `ReferenceableObject` $ref = null )` Used to create an object that is 'temporary' : means that is not supported (like Regions) or that is on Panorama. This is a trick to play with objects that don't exist in the conf. Used to create an object that is 'temporary' : means that is not supported (like Regions) or that is on Panorama. This is a trick to play with objects that don't exist in the conf. #### Parameters $name `string` $name $ref ``ReferenceableObject`` $ref #### Returns ``Address``
`public boolean` | # `referencedObjectRenamed( `Address`|`AddressGroup` $h, string $oldName )` #### Parameters $h ``Address`|`AddressGroup`` $h $oldName `string` $oldName #### Returns `boolean` #### Throws ``Exception``
`public` | # `countUnused( )`
`public` | # `countUnusedAddresses( )`
`public` | # `countUnusedAddressGroups( )`

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

Properties summary
`public `VirtualSystem`|`DeviceGroup`|`PanoramaConf`|`PANConf`|null` | $owner | `` | #
`public null|`AddressStore`` | $parentCentralStore | `null` | #
`protected `Address[]`|`AddressGroup[]`` | $_all | `array()` | #
`protected `Address[]`` | $_addressObjects | `array()` | #
`protected array` | $_tmpAddresses | `array()` | #
`protected `AddressGroup[]`` | $_addressGroups | `array()` | #
`public `DOMElement`` | $addressRoot | `` | #
`public `DOMElement`` | $addressGroupRoot | `` | #

Magic properties used from PathableName
`$name, $owner`