Documentation

Config

FortiManagerAPI configuration.

Tags
link

Fortinet developer ressource center.

Table of Contents

$hostname  : string
$password  : string
$SSLVerifyHost  : int
$SSLVerifyPeer  : bool
$timeout  : int
$username  : string
$hostname  : string
$password  : string
$SSLVerifyHost  : int
$SSLVerifyPeer  : bool
$timeout  : int
$username  : string
__construct()  : Config
Constructor takes care of checking and registering information.
getHostname()  : string
Getter for firewall's FQDN.
getPassword()  : string
Getter for API autorized user's password.
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.
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

$hostname

public string $hostname

FortiManager's FQDN.

$password

public string $password

FortiManager user's valid password.

$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

FortiManager user's valid username.

$hostname

private string $hostname

$password

private string $password

$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

FortiManager'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 FortiManagerAPI class.

getHostname()

Getter for firewall's FQDN.

public getHostname() : string
Return values
string

FortiManager's FQDN.

getPassword()

Getter for API autorized user's password.

public getPassword() : string
Return values
string

API autorized user's password.

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.

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 FortiManagerAPI object.

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 FortiManagerAPI object.

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 FortiManagerAPI object.

Search results