ClientHelper
Client helper class
since |
1.7.0 |
---|---|
package |
Joomla CMS |
Methods
getCredentials
Method to return the array of client layer configuration options
getCredentials( client, force = false) : mixed||string|int
since |
1.7.0 |
---|
Arguments
- client
string
Client name, currently only 'ftp' is supported- force
bool
Forces re-creation of the login credentials. Set this to true if login credentials in the session storage have changed
Response
array<string|int, mixed>
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( client) :
since |
1.7.0 |
---|
Arguments
- client
string
Client name, currently only 'ftp' is supported
Response
bool
True if login credentials are available
setCredentials
Method to set client login credentials
setCredentials( client, user, pass) :
since |
1.7.0 |
---|
Arguments
- client
string
Client name, currently only 'ftp' is supported- user
string
Username- pass
string
Password
Response
bool
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( client) :
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 |
1.7.0 |
---|---|
throws |
|
Arguments
- client
string
The name of the client.
Response
bool
True if credentials are present