Packageindex Classtrees Modulegroups Elementlist Report XML Files

XName -

Zone

Zone

Class containing global functions regarding zones

 

public class Zone

Class containing global functions regarding zones

 
Direct known subclasses: Secondary, Primary

Public Method Summary

void

Zone(string $dbase, string $zonename, string $zonetype)

Class constructor
int

retrieveID(string $zonename, string $zonetype)

Retrieve ID of current zone in $this->zoneid
int

zoneCreate(string $zonename, string $zonetype, int $userid)

Insert new zone in dns_zone table
int

zoneDelete(string $zonename, string $zonetype)

Delete zone and records from all tables
string

zoneLogs(string $class1, string $class2)

Return HTML table with all logs regarding zone
string

zoneStatus()

Returns status of zone: I(nformation), W(arning), E(rror), or U(nknown)
int

RetrieveUser()

Retrieve user ID of zone owner

Private Method Summary

int

Exists(string $zonename, string $zonetype)

Check if zone already exists
array

subExists(string $zonename, int $userid)

Check if part of current zone is already registered

Private Field Summary

unknown

$db

unknown

$error

unknown

$zonename

unknown

$zonetype

unknown

$userid

unknown

$zoneid

Public Method Details

Zone

public void Zone( string $dbase, string $zonename, string $zonetype )

  Class constructor

Parameter
string $dbase
database currently used
string $zonename
name of zone, may be empty
string $zonetype
type of zone ('M'aster or 'S'lave)
Returns void


retrieveID

public int retrieveID( string $zonename, string $zonetype )

  Retrieve ID of current zone in $this->zoneid

Parameter
string $zonename
name of zone
string $zonetype
type of zone ('M'aster or 'S'lave)
Returns int

0 if error or no such zone, 1 if ID found


zoneCreate

public int zoneCreate( string $zonename, string $zonetype, int $userid )

  Insert new zone in dns_zone table

Parameter
string $zonename
zone name
string $zonetype
zone type ('M'aster or 'S'lave)
int $userid
user ID
Returns int

1 if success, 0 if trouble


zoneDelete

public int zoneDelete( string $zonename, string $zonetype )

  Delete zone and records from all tables

Parameter
string $zonename
zone name
string $zonetype
zone type ('M'aster or 'S'lave)
Returns int

1 if success, 0 if trouble


zoneLogs

public string zoneLogs( string $class1, string $class2 )

  Return HTML table with all logs regarding zone
Lines are alternatively colored using class parameterfor <tr> and <td>. classes have to be defined in CSS file,as <classname>INFORMATION,<classname>WARNING,<classname>ERROR

Parameter
string $class1
<classname>
string $class2
<alternateclassname>
Returns string

html code of rows


zoneStatus

public string zoneStatus( )

  Returns status of zone: I(nformation), W(arning), E(rror), or U(nknown)

Returns string

I W E or U or 0 if trouble


RetrieveUser

public int RetrieveUser( )

  Retrieve user ID of zone owner

Returns int

user ID or 0 if trouble


Private Method Details

Exists

private int Exists( string $zonename, string $zonetype )

  Check if zone already exists

Parameter
string $zonename
name of zone
string $zonetype
type of zone ('M'aster or 'S'lave)
Returns int

1 if true, 0 if false or error


subExists

private array subExists( string $zonename, int $userid )

  Check if part of current zone is already registered
Check if the current zone is a sub-zone of anexisting one, or if a subzone of this one isalready registered.

Parameter
string $zonename
name of zone
int $userid
user ID
Returns array

list of zones having links with this one, or 0 if error


Private Field Details

$db

private unknown $db

>><<



$error

private unknown $error

>><<



$zonename

private unknown $zonename

>><<



$zonetype

private unknown $zonetype

>><<



$userid

private unknown $userid

>><<



$zoneid

private unknown $zoneid

>><<




Packageindex Classtrees Modulegroups Elementlist Report XML Files
PHPDoc 1.0beta