Joomla CMS
3.10.11 (avec JPlatform 13.1 inclus)
Documentation des API du CMS Joomla en version 3.10.11 et du framework Joomla Platform intégré
|
Fonctions membres publiques | |
setAdapter ($className) | |
getAdapterName () | |
setAdapterOptions (array $options) | |
getAdapterOptions () | |
getFromURL ($url) | |
importFromURL ($params) | |
Fonctions membres protégées statiques | |
static | getFiles ($path, array $ignoreFolders=array(), array $ignoreFiles=array()) |
static | scanDirectory ($path, array $ignoreFolders=array(), array $ignoreFiles=array()) |
Fonctions membres privées | |
getParam ($key, $default=null) | |
Attributs privés | |
$params = array() | |
$adapter = null | |
$adapterOptions = array() | |
getAdapterName | ( | ) |
getAdapterOptions | ( | ) |
Returns the additional options for the adapter
|
staticprotected |
This method will crawl a starting directory and get all the valid files that will be analyzed by __construct. Then it organizes them into an associative array.
string | $path | Folder where we should start looking |
array | $ignoreFolders | Folder ignore list |
array | $ignoreFiles | File ignore list |
fullpath
key contains the path to the file, and the classname
key contains the name of the class getFromURL | ( | $url | ) |
|
private |
importFromURL | ( | $params | ) |
Performs the staggered download of file. The downloaded file will be stored in Joomla!'s temp-path using the basename of the URL as a filename
The $params array can have any of the following keys url The file being downloaded frag Rolling counter of the file fragment being downloaded totalSize The total size of the file being downloaded, in bytes doneSize How many bytes we have already downloaded maxExecTime Maximum execution time downloading file fragments, in seconds length How many bytes to download at once
The array returned is in the following format:
status True if there are no errors, false if there are errors error A string with the error message if there are errors frag The next file fragment to download totalSize The total size of the downloaded file in bytes, if the server supports HEAD requests doneSize How many bytes have already been downloaded percent % of the file already downloaded (if totalSize could be determined) localfile The name of the local file, without the path
array | $params | A parameters array, as sent by the user interface |
Références $filesize, $params, $start, $url, elseif, et JPATH_ROOT.
|
staticprotected |
Recursive function that will scan every directory unless it's in the ignore list. Files that aren't in the ignore list are returned.
string | $path | Folder where we should start looking |
array | $ignoreFolders | Folder ignore list |
array | $ignoreFiles | File ignore list |
setAdapter | ( | $className | ) |
Forces the use of a specific adapter
string | $className | The name of the class or the name of the adapter, e.g. 'FOFDownloadAdapterCurl' or 'curl' |
Références $className, elseif, et null.
setAdapterOptions | ( | array | $options | ) |
|
private |
|
private |
|
private |