JClientHelper

Client helper class

package

Joomla.Platform

subpackage

Client

since

11.1

Methods

getCredentials

Method to return the array of client layer configuration options

getCredentials(string $client, boolean $force = false) : array
static
since

11.1

Arguments

$client

stringClient name, currently only 'ftp' is supported

$force

booleanForces re-creation of the login credentials. Set this to true if login credentials in the session storage have changed

Response

arrayClient layer configuration options, consisting of at least these fields: enabled, host, port, user, pass, root

hasCredentials

Method to determine if client login credentials are present

hasCredentials(string $client) : boolean
static
since

11.1

Arguments

$client

stringClient name, currently only 'ftp' is supported

Response

booleanTrue if login credentials are available

setCredentials

Method to set client login credentials

setCredentials(string $client, string $user, string $pass) : boolean
static
since

11.1

Arguments

$client

stringClient name, currently only 'ftp' is supported

$user

stringUsername

$pass

stringPassword

Response

booleanTrue if the given login credentials have been set and are valid

setCredentialsFromRequest

Determine whether input fields for client settings need to be shown

setCredentialsFromRequest(string $client) : mixed
static

If valid credentials were passed along with the request, they are saved to the session. This functions returns an exception if invalid credentials have been given or if the connection to the server failed for some other reason.

since

11.1

Arguments

$client

stringThe name of the client.

Response

mixedTrue, if FTP settings should be shown or an exception