WatchGuardXMLFile

Class WatchGuardXMLFile

package

BOC

Methods

WatchGuardXMLFile constructor.

__construct( $xmlfilename) 

loads the xmlfile, initializes all aliases, policies and services.

Arguments

$xmlfilename

stores policy references to alias objects

findAliasRefByPolicy() 

finds alias references and stores the reference at the object.

findAliasReferences() 

or at least tries to. could be more sophisticated, but this is a quick start with hitting feels like about 98%

stores policy references to services

findServiceRefByPolicy() 

stores policy references to tags

findTagRefByPolicy() 

tags are not stored in but in for whatever reason... so loop over abs-policy-list also for tags.

reads all aliases from xml and sets the pointer into allAliases array

getAllAliases() 

reads all policies from xml and sets the pointer into allPolicies array

getAllPolicies() 

also initializes the alias references; if an alias is referenced by this policy, it is stored at the alias object.

reads all services from xml and sets the pointer into allServices array

getAllServices() 

reads all tags from xml and sets the pointer into allTags array

getAllTags() 

searchs an xml object by name and returns the found simpleXMLElement

getXMLObject(\SimpleXMLElement $obj,  $searchname) : \SimpleXMLElement|null

Arguments

$obj

\SimpleXMLElement

$searchname

Response

\SimpleXMLElement|null

lists (all) aliases in this xmlfile

listAllAliases() 

lists (all) policies in this xmlfile

listAllPolicies() 

lists (all) services in this xmlfile

listAllServices() 

lists (all) tags in this xmlfile

listAllTags() 

prints one single alias

printAlias( $aliasname) 

Arguments

$aliasname

resolves aliases for printing out the details

resolveAliasAddress( $searchstring) : string

currently supports addresses and networks (addr/mask). and partly things like interfaces.

Arguments

$searchstring

Response

string

Properties

base object containing the loaded xml structure and all methods

xmlfile : \SimpleXMLElement
var

Type(s)

\SimpleXMLElement

array for all aliases from this xmlfile

allAliases : array
var

Type(s)

array

array for all policies from this xmlfile

allPolicies : array
var

Type(s)

array

array for all services from this xmlfile

allServices : array
var

Type(s)

array

array for all tags from this xmlfile

allTags : array
var

Type(s)

array