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
since |
11.1 |
---|
Arguments
- $client
string
Client name, currently only 'ftp' is supported- $force
boolean
Forces re-creation of the login credentials. Set this to true if login credentials in the session storage have changed
Response
array
Client 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
since |
11.1 |
---|
Arguments
- $client
string
Client name, currently only 'ftp' is supported
Response
boolean
True if login credentials are available
setCredentials
Method to set client login credentials
setCredentials(string $client, string $user, string $pass) : boolean
since |
11.1 |
---|
Arguments
- $client
string
Client name, currently only 'ftp' is supported- $user
string
Username- $pass
string
Password
Response
boolean
True 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
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
string
The name of the client.
Response
mixed
True, if FTP settings should be shown or an exception