PHP 클래스 FOF30\Download\Download

파일 보기 프로젝트 열기: akeeba/fof 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$container FOF30\Container\Container The component container object

공개 메소드들

메소드 설명
__construct ( Container $c ) Public constructor
getAdapterName ( ) : string Returns the name of the current adapter
getAdapterOptions ( ) : array Returns the additional options for the adapter
getFromURL ( string $url, integer $from = null, integer $to = null ) : boolean | string Download data from a URL and return it.
importFromURL ( array $params ) : array Performs the staggered download of file.
setAdapter ( string $className ) Forces the use of a specific adapter
setAdapterOptions ( array $options ) Sets the additional options for the adapter

보호된 메소드들

메소드 설명
getFiles ( string $path, array $ignoreFolders = [], array $ignoreFiles = [] ) : array 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.
scanDirectory ( string $path, array $ignoreFolders = [], array $ignoreFiles = [] ) : array Recursive function that will scan every directory unless it's in the ignore list. Files that aren't in the ignore list are returned.

비공개 메소드들

메소드 설명
getParam ( string $key, mixed $default = null ) : mixed Used to decode the $params array

메소드 상세

__construct() 공개 메소드

Public constructor
public __construct ( Container $c )
$c FOF30\Container\Container The component container

getAdapterName() 공개 메소드

Returns the name of the current adapter
public getAdapterName ( ) : string
리턴 string

getAdapterOptions() 공개 메소드

Returns the additional options for the adapter
public getAdapterOptions ( ) : array
리턴 array

getFiles() 보호된 정적인 메소드

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.
protected static getFiles ( string $path, array $ignoreFolders = [], array $ignoreFiles = [] ) : array
$path string Folder where we should start looking
$ignoreFolders array Folder ignore list
$ignoreFiles array File ignore list
리턴 array Associative array, where the `fullpath` key contains the path to the file, and the `classname` key contains the name of the class

getFromURL() 공개 메소드

Important note about ranges: byte ranges start at 0. This means that the first 500 bytes of a file are from 0 to 499, NOT from 1 to 500. If you ask more bytes than there are in the file or a range which is invalid or does not exist this method will return false.
public getFromURL ( string $url, integer $from = null, integer $to = null ) : boolean | string
$url string The URL to download from
$from integer Byte range to start downloading from. Use null (default) for start of file.
$to integer Byte range to stop downloading. Use null to download the entire file ($from will be ignored!)
리턴 boolean | string The downloaded data or false on failure

importFromURL() 공개 메소드

Performs the staggered download of file.
public importFromURL ( array $params ) : array
$params array A parameters array, as sent by the user interface
리턴 array A return status array

scanDirectory() 보호된 정적인 메소드

Recursive function that will scan every directory unless it's in the ignore list. Files that aren't in the ignore list are returned.
protected static scanDirectory ( string $path, array $ignoreFolders = [], array $ignoreFiles = [] ) : array
$path string Folder where we should start looking
$ignoreFolders array Folder ignore list
$ignoreFiles array File ignore list
리턴 array List of all the files

setAdapter() 공개 메소드

Forces the use of a specific adapter
public setAdapter ( string $className )
$className string The name of the class or the name of the adapter

setAdapterOptions() 공개 메소드

Sets the additional options for the adapter
public setAdapterOptions ( array $options )
$options array

프로퍼티 상세

$container 보호되어 있는 프로퍼티

The component container object
protected Container,FOF30\Container $container
리턴 FOF30\Container\Container