Skip to content

Latest commit

 

History

History
440 lines (206 loc) · 5.62 KB

README.md

File metadata and controls

440 lines (206 loc) · 5.62 KB

ExaBGP\VoIPBL Library Documentation

Table of Contents

Controller

The Controller class.

  • Full name: \ExaBGP\VoIPBL\Controller

See Also:

__construct

Create a new Controller instance.

Controller::__construct(  ): void

init

Initialize an ExaBGP connection.

Controller::init(  ): void

loadVersion

Load the ExaBGP version.

Controller::loadVersion(  ): void

sendCommand

Send an API command to ExaBGP.

Controller::sendCommand( string $cmd, boolean $response = false ): boolean|string

Parameters:

Parameter Type Description
$cmd string The command to execute.
$response boolean Indicate whether to return the API response.

Loader

The Loader class.

  • Full name: \ExaBGP\VoIPBL\Loader

See Also:

__construct

Create a new Loader instance.

Loader::__construct( string $path = __DIR__, string $cfg = 'voipbl.conf' ): void

Parameters:

Parameter Type Description
$path string The data path.
$cfg string The configuration file name.

start

Handover the process to ExaBGP.

Loader::start(  ): void

Validator

The Validator class.

  • Full name: \ExaBGP\VoIPBL\Validator

See Also:

isIP

Validate an IP address.

Validator::isIP( string $ip ): boolean

Parameters:

Parameter Type Description
$ip string An IP address.

isCIDR

Validate an IP/CIDR address.

Validator::isCIDR( string $ipcidr ): boolean

Parameters:

Parameter Type Description
$ipcidr string An IP/CIDR address.

isPrivateIP

Validate an RFC1918 IP or IP/CIDR address.

Validator::isPrivateIP( string $ipcidr ): boolean

Parameters:

Parameter Type Description
$ipcidr string An IP or IP/CIDR address.

isReservedIP

Validate an RFC1700 IP or IP/CIDR address.

Validator::isReservedIP( string $ipcidr ): boolean

Parameters:

Parameter Type Description
$ipcidr string An IP or IP/CIDR address.

isNotPrivateIP

Validate an RFC1918 IP or IP/CIDR address. (negates)

Validator::isNotPrivateIP( string $ipcidr ): boolean

Parameters:

Parameter Type Description
$ipcidr string An IP or IP/CIDR address.

isNotReservedIP

Validate an RFC1700 IP or IP/CIDR address. (negates)

Validator::isNotReservedIP( string $ipcidr ): boolean

Parameters:

Parameter Type Description
$ipcidr string An IP or IP/CIDR address.

isURL

Validate a URL.

Validator::isURL( string $url ): boolean

Parameters:

Parameter Type Description
$url string A URL.

isRegularExpression

Validate a regular expression.

Validator::isRegularExpression( string $expr ): boolean

Parameters:

Parameter Type Description
$expr string A regular expression.

makeCIDR

Change an IP into an IP/CIDR.

Validator::makeCIDR( string $ip ): boolean

Parameters:

Parameter Type Description
$ip string An IP address.

ensureFileIsReadable

Ensure the given file is readable.

Validator::ensureFileIsReadable( string $file ): void

Parameters:

Parameter Type Description
$file string The file to read.

ensureFileIsWritable

Ensure the given file is writable.

Validator::ensureFileIsWritable( string $file ): void

Parameters:

Parameter Type Description
$file string The file to write to.

ensureRequiredCfg

Ensure the required configuration parameters are present.

Validator::ensureRequiredCfg( string $cfg ): void

Parameters:

Parameter Type Description
$cfg string The configuration parameters.


This document was automatically generated from source code comments on 2019-04-24 using phpDocumentor and cvuorinen/phpdoc-markdown-public