Documentation

Config

FortiOSAPI configuration.

Tags
link

Fortinet developer ressource center.

Table of Contents

$apiVersion  : int
$hostname  : string
$password  : string
$proxy  : string
$SSLVerifyHost  : int
$SSLVerifyPeer  : bool
$timeout  : int
$username  : string
$apiVersion  : int
$hostname  : string
$password  : string
$proxy  : string
$SSLVerifyHost  : int
$SSLVerifyPeer  : bool
$timeout  : int
$username  : string
__construct()  : Config
Constructor takes care of checking and registering information.
getAPIVersion()  : int
Getter for API version to use.
getHostname()  : string
Getter for firewall's FQDN.
getPassword()  : string
Getter for API autorized user's password.
getProxy()  : string
Getter for curl proxy string.
getSSLVerifyHost()  : int
Getter for curl's option to verify SSL peer.
getSSLVerifyPeer()  : bool
Getter for curl's option to verify SSL peer.
getTimeout()  : int
Getter for curl's timeout in ms.
getUsername()  : string
Getter for API autorized user.
setAPIVersion()  : Config
Setter for API version to use.
setProxy()  : Config
Setter for proxy connect url.
setSSLVerifyHost()  : Config
Setter for curl's option to verify SSL peer.
setSSLVerifyPeer()  : Config
Setter for curl's option to verify SSL peer.
setTimeout()  : Config
Setter for curl's timeout in ms.

Properties

$apiVersion

public int $apiVersion

API version to use, default to 2.

$hostname

public string $hostname

Firewall's FQDN.

$password

public string $password

Firewall user's valid password.

$proxy

public string $proxy

Proxy url to use.

$SSLVerifyHost

public int $SSLVerifyHost

HTTP client ssl verify host option.

$SSLVerifyPeer

public bool $SSLVerifyPeer

HTTP client ssl verify peer option.

$timeout

public int $timeout

Wanted HTTP requests timeout, default to 5 seconds.

$username

public string $username

Firewall user's valid username.

$apiVersion

private int $apiVersion = 2

$hostname

private string $hostname

$password

private string $password

$proxy

private string $proxy = ""

$SSLVerifyHost

private int $SSLVerifyHost = 2

$SSLVerifyPeer

private bool $SSLVerifyPeer = true

$timeout

private int $timeout = 5000

$username

private string $username

Methods

__construct()

Constructor takes care of checking and registering information.

public __construct(string $hostname, string $username, string $password) : Config
Parameters
$hostname : string

Firewall's FQDN or IP address.

$username : string

A valid firewall user.

$password : string

The valid user's password.

Return values
Config

Config object to be passed on a new instance of different FortiOS APIs classes.

getAPIVersion()

Getter for API version to use.

public getAPIVersion() : int
Return values
int

API version to use.

getHostname()

Getter for firewall's FQDN.

public getHostname() : string
Return values
string

Firewall's FQDN.

getPassword()

Getter for API autorized user's password.

public getPassword() : string
Return values
string

API autorized user's password.

getProxy()

Getter for curl proxy string.

public getProxy() : string
Return values
string

Proxy connect url

getSSLVerifyHost()

Getter for curl's option to verify SSL peer.

public getSSLVerifyHost() : int
Return values
int

Curl's option to verify SSL host.

getSSLVerifyPeer()

Getter for curl's option to verify SSL peer.

public getSSLVerifyPeer() : bool
Return values
bool

Curl's option to verify SSL peer.

getTimeout()

Getter for curl's timeout in ms.

public getTimeout() : int
Return values
int

Curl's timeout in ms.

getUsername()

Getter for API autorized user.

public getUsername() : string
Return values
string

API autorized user.

setAPIVersion()

Setter for API version to use.

public setAPIVersion(int $version) : Config
Parameters
$version : int

API version to use e.g. '2'.

Return values
Config

Config object to be passed on a new instance of FortiOS APIs classes.

setProxy()

Setter for proxy connect url.

public setProxy(string $url) : Config
Parameters
$url : string

Curl's proxy connect url.

Return values
Config

Config object to be passed on a new instance of FortiOS APIs classes.

setSSLVerifyHost()

Setter for curl's option to verify SSL peer.

public setSSLVerifyHost(bool $verifySSLHost) : Config
Parameters
$verifySSLHost : bool

Curl's option to verify SSL host.

Return values
Config

Config object to be passed on a new instance of FortiOS APIs classes.

setSSLVerifyPeer()

Setter for curl's option to verify SSL peer.

public setSSLVerifyPeer(int $verifySSLPeer) : Config
Parameters
$verifySSLPeer : int

Curl's option to verify SSL peer.

Return values
Config

Config object to be passed on a new instance of FortiOS APIs classes.

setTimeout()

Setter for curl's timeout in ms.

public setTimeout(int $timeout) : Config
Parameters
$timeout : int

Curl's timeout in ms.

Return values
Config

Config object to be passed on a new instance of FortiOS APIs classes.

Search results