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é
Référence de la classe FOFDownloadAdapterAbstract
+ Graphe d'héritage de FOFDownloadAdapterAbstract:

Fonctions membres publiques

 supportsChunkDownload ()
 
 supportsFileSize ()
 
 isSupported ()
 
 getPriority ()
 
 getName ()
 
 downloadAndReturn ($url, $from=null, $to=null, array $params=array())
 
 getFileSize ($url)
 

Champs de données

 $priority = 100
 
 $name = ''
 
 $isSupported = false
 
 $supportsChunkDownload = false
 
 $supportsFileSize = false
 

Description détaillée

Abstract base class for download adapters

Documentation des fonctions membres

◆ downloadAndReturn()

downloadAndReturn (   $url,
  $from = null,
  $to = null,
array  $params = array() 
)

Download a part (or the whole) of a remote URL and return the downloaded data. You are supposed to check the size of the returned data. If it's smaller than what you expected you've reached end of file. If it's empty you have tried reading past EOF. If it's larger than what you expected the server doesn't support chunk downloads.

If this class' supportsChunkDownload returns false you should assume that the $from and $to parameters will be ignored.

Paramètres
string$urlThe remote file's URL
integer$fromByte range to start downloading from. Use null for start of file.
integer$toByte range to stop downloading. Use null to download the entire file ($from is ignored)
array$paramsAdditional params that will be added before performing the download
Renvoie
string The raw file data retrieved from the remote URL.
Exceptions
ExceptionA generic exception is thrown on error

Implémente FOFDownloadInterface.

◆ getFileSize()

getFileSize (   $url)

Get the size of a remote file in bytes

Paramètres
string$urlThe remote file's URL
Renvoie
integer The file size, or -1 if the remote server doesn't support this feature

Implémente FOFDownloadInterface.

◆ getName()

getName ( )

Returns the name of this download adapter in use

Renvoie
string

Implémente FOFDownloadInterface.

Références $name.

◆ getPriority()

getPriority ( )

Get the priority of this adapter. If multiple download adapters are supported on a site, the one with the highest priority will be used.

Renvoie
boolean

Implémente FOFDownloadInterface.

◆ isSupported()

isSupported ( )

Is this download class supported in the current server environment?

Renvoie
boolean True if this server environment supports this download class

Implémente FOFDownloadInterface.

◆ supportsChunkDownload()

supportsChunkDownload ( )

Does this download adapter support downloading files in chunks?

Renvoie
boolean True if chunk download is supported

Implémente FOFDownloadInterface.

◆ supportsFileSize()

supportsFileSize ( )

Does this download adapter support reading the size of a remote file?

Renvoie
boolean True if remote file size determination is supported

Implémente FOFDownloadInterface.

Documentation des champs

◆ $isSupported

◆ $name

$name = ''

◆ $priority

$priority = 100

◆ $supportsChunkDownload

◆ $supportsFileSize


La documentation de cette classe a été générée à partir du fichier suivant :