Property | Type | Description | |
---|---|---|---|
$container | The component container object |
Method | Description | |
---|---|---|
__construct ( |
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 |
Method | Description | |
---|---|---|
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. |
Method | Description | |
---|---|---|
getParam ( string $key, mixed $default = null ) : mixed | Used to decode the $params array |
public __construct ( |
||
$c | The component container |
public getAdapterName ( ) : string | ||
return | string |
public getAdapterOptions ( ) : array | ||
return | 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 |
return | array | Associative array, where the `fullpath` key contains the path to the file, and the `classname` key contains the name of the class |
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!) |
return | boolean | string | The downloaded data or false on failure |
public importFromURL ( array $params ) : array | ||
$params | array | A parameters array, as sent by the user interface |
return | array | A return status array |
public setAdapter ( string $className ) | ||
$className | string | The name of the class or the name of the adapter |
public setAdapterOptions ( array $options ) | ||
$options | array |