Liste de tous les membres
Fonctions membres publiques |
| __construct ($options=array()) |
| __destruct () |
| getInstance ($host= '127.0.0.1', $port= '21', $options=null, $user=null, $pass=null) |
| setOptions ($options) |
| connect ($host= '127.0.0.1', $port=21) |
| isConnected () |
| login ($user= 'anonymous', $pass= 'jftp @joomla.org') |
| quit () |
| pwd () |
| syst () |
| chdir ($path) |
| reinit () |
| rename ($from, $to) |
| chmod ($path, $mode) |
| delete ($path) |
| mkdir ($path) |
| restart ($point) |
| create ($path) |
| read ($remote, &$buffer) |
| get ($local, $remote) |
| store ($local, $remote=null) |
| write ($remote, $buffer) |
| listNames ($path=null) |
| listDetails ($path=null, $type= 'all') |
Attributs protégés statiques |
static | $instances = array() |
Documentation des constructeurs et destructeur
JFTP::__construct |
( |
|
$options = array() | ) |
|
JFTP object destructor
Closes an existing connection, if we have one
- Depuis:
- 11.1
Références quit().
Documentation des fonctions membres
JFTP::_findMode |
( |
|
$fileName | ) |
|
|
protected |
Method to find out the correct transfer mode for a specific file
- Paramètres:
-
string | $fileName | Name of the file |
- Renvoie:
- integer Transfer-mode for this filetype [FTP_ASCII|FTP_BINARY]
- Depuis:
- 11.1
Références $mode, et elseif.
Référencé par get(), read(), store(), et write().
Set server to passive mode and open a data port connection
- Renvoie:
- boolean True if successful
- Depuis:
- 11.1
Références $_timeout, $parts, JText\_(), null, JError\raiseWarning(), et JText\sprintf().
Référencé par create(), get(), listDetails(), listNames(), read(), store(), et write().
JFTP::_putCmd |
( |
|
$cmd, |
|
|
|
$expectedResponse |
|
) |
| |
|
protected |
Send command to the FTP server and validate an expected response code
- Paramètres:
-
string | $cmd | Command to send to the FTP server |
mixed | $expectedResponse | Integer response code or array of integer response codes |
- Renvoie:
- boolean True if command executed successfully
- Depuis:
- 11.1
Références $cmd, JText\_(), _verifyResponse(), JError\raiseWarning(), et JText\sprintf().
Référencé par _mode(), chdir(), chmod(), create(), delete(), get(), listDetails(), listNames(), login(), mkdir(), pwd(), read(), reinit(), rename(), restart(), store(), syst(), et write().
JFTP::_verifyResponse |
( |
|
$expected | ) |
|
|
protected |
Verify the response code from the server and log response if flag is set
- Paramètres:
-
mixed | $expected | Integer response code or array of integer response codes |
- Renvoie:
- boolean True if response code from the server is expected
- Depuis:
- 11.1
Références $_timeout, $parts, null, JError\raiseWarning(), et JText\sprintf().
Référencé par _putCmd(), connect(), create(), get(), listDetails(), listNames(), read(), store(), et write().
JFTP::chmod |
( |
|
$path, |
|
|
|
$mode |
|
) |
| |
JFTP::connect |
( |
|
$host = '127.0.0.1' , |
|
|
|
$port = 21 |
|
) |
| |
JFTP::get |
( |
|
$local, |
|
|
|
$remote |
|
) |
| |
JFTP::getInstance |
( |
|
$host = '127.0.0.1' , |
|
|
|
$port = '21' , |
|
|
|
$options = null , |
|
|
|
$user = null , |
|
|
|
$pass = null |
|
) |
| |
Returns the global FTP connector object, only creating it if it doesn't already exist.
You may optionally specify a username and password in the parameters. If you do so, you may not login() again with different credentials using the same object. If you do not use this option, you must quit() the current connection when you are done, to free it for use by others.
- Paramètres:
-
string | $host | Host to connect to |
string | $port | Port to connect to |
array | $options | Array with any of these options: type=>[FTP_AUTOASCII|FTP_ASCII|FTP_BINARY], timeout=>(int) |
string | $user | Username to use for a connection |
string | $pass | Password to use for a connection |
- Renvoie:
- JFTP The FTP Client object.
- Depuis:
- 11.1
Références $options, $return, $user, isConnected(), et null.
Référencé par JInstallationModelFilesystem\_chmod(), JInstallationModelConfiguration\_createConfiguration(), JInstallationModelFilesystem\checkSettings(), AdmintoolsHelperDownload\chmod(), JFolder\copy(), JFile\copy(), JFolder\create(), JoomlaupdateModelDefault\createRestorationFile(), JFile\delete(), JFolder\delete(), JInstallationModelFilesystem\detectFtpRoot(), JFile\move(), JFolder\move(), JInstallationControllerSetup\removeFolder(), JClientHelper\setCredentials(), JInstallationModelFilesystem\setFolderPermissions(), JFile\upload(), JInstallationModelFilesystem\verifyFtpSettings(), et JFile\write().
Method to determine if the object is connected to an FTP server
- Renvoie:
- boolean True if connected
- Depuis:
- 11.1
Référencé par getInstance().
JFTP::listDetails |
( |
|
$path = null , |
|
|
|
$type = 'all' |
|
) |
| |
Method to list the contents of a directory on the FTP server
- Paramètres:
-
string | $path | Path to the local file to be stored on the FTP server |
string | $type | Return type [raw|all|folders|files] |
- Renvoie:
- mixed If $type is raw: string Directory listing, otherwise array of string with file-names
Références $data, $file, $path, $type, JText\_(), _passive(), _putCmd(), _verifyResponse(), elseif, null, JError\raiseWarning(), et JText\sprintf().
Référencé par listNames().
JFTP::listNames |
( |
|
$path = null | ) |
|
Method to list the filenames of the contents of a directory on the FTP server
Note: Some servers also return folder names. However, to be sure to list folders on all servers, you should use listDetails() instead if you also need to deal with folders
- Paramètres:
-
string | $path | Path local file to store on the FTP server |
- Renvoie:
- string Directory listing
- Depuis:
- 11.1
Références $data, $key, $list, $path, JText\_(), _passive(), _putCmd(), _verifyResponse(), listDetails(), null, JError\raiseWarning(), et JText\sprintf().
JFTP::login |
( |
|
$user = 'anonymous' , |
|
|
|
$pass = 'jftp@joomla.org' |
|
) |
| |
Method to login to a server once connected
- Paramètres:
-
string | $user | Username to login to the server |
string | $pass | Password to login to the server |
- Renvoie:
- boolean True if successful
- Depuis:
- 11.1
Références $user, _putCmd(), JError\raiseWarning(), et JText\sprintf().
Method to quit and close the connection
- Renvoie:
- boolean True if successful
- Depuis:
- 11.1
Référencé par __destruct().
JFTP::read |
( |
|
$remote, |
|
|
& |
$buffer |
|
) |
| |
JFTP::rename |
( |
|
$from, |
|
|
|
$to |
|
) |
| |
JFTP::setOptions |
( |
|
$options | ) |
|
Set client options
- Paramètres:
-
array | $options | Associative array of options to set |
- Renvoie:
- boolean True if successful
- Depuis:
- 11.1
Références $options.
Référencé par __construct().
JFTP::store |
( |
|
$local, |
|
|
|
$remote = null |
|
) |
| |
JFTP::write |
( |
|
$remote, |
|
|
|
$buffer |
|
) |
| |
Documentation des données membres
Valeur initiale : array(
"asp",
"bat",
"c",
"cpp",
"csv",
"h",
"htm",
"html",
"shtml",
"ini",
"inc",
"log",
"php",
"php3",
"pl",
"perl",
"sh",
"sql",
"txt",
"xhtml",
"xml")
JFTP::$_lineEndings = array('UNIX' => "\n", 'MAC' => "\r", 'WIN' => "\r\n") |
|
private |
JFTP::$instances = array() |
|
staticprotected |
La documentation de cette classe a été générée à partir du fichier suivant :