class Config in One Click Upload 7.2
Hierarchy
- class \Flow\Config implements ConfigInterface
Expanded class hierarchy of Config
4 files declare their use of Config
- ConfigTest.php in flowphp/
test/ Unit/ ConfigTest.php - FileTest.php in flowphp/
test/ Unit/ FileTest.php - FustyRequestTest.php in flowphp/
test/ Unit/ FustyRequestTest.php - MongoConfig.php in flowphp/
src/ Flow/ Mongo/ MongoConfig.php
File
- flowphp/
src/ Flow/ Config.php, line 5
Namespace
FlowView source
class Config implements ConfigInterface {
/**
* Config
*
* @var array
*/
private $config;
/**
* Controller
*
* @param array $config
*/
public function __construct($config = array()) {
$this->config = $config;
}
/**
* Set path to temporary directory for chunks storage
*
* @param $path
*/
public function setTempDir($path) {
$this->config['tempDir'] = $path;
}
/**
* Get path to temporary directory for chunks storage
*
* @return string
*/
public function getTempDir() {
return isset($this->config['tempDir']) ? $this->config['tempDir'] : '';
}
/**
* Set chunk identifier
*
* @param callable $callback
*/
public function setHashNameCallback($callback) {
$this->config['hashNameCallback'] = $callback;
}
/**
* Generate chunk identifier
*
* @return callable
*/
public function getHashNameCallback() {
return isset($this->config['hashNameCallback']) ? $this->config['hashNameCallback'] : '\\Flow\\Config::hashNameCallback';
}
/**
* Callback to pre-process chunk
*
* @param callable $callback
*/
public function setPreprocessCallback($callback) {
$this->config['preprocessCallback'] = $callback;
}
/**
* Callback to pre-process chunk
*
* @return callable|null
*/
public function getPreprocessCallback() {
return isset($this->config['preprocessCallback']) ? $this->config['preprocessCallback'] : null;
}
/**
* Delete chunks on save
*
* @param bool $delete
*/
public function setDeleteChunksOnSave($delete) {
$this->config['deleteChunksOnSave'] = $delete;
}
/**
* Delete chunks on save
*
* @return bool
*/
public function getDeleteChunksOnSave() {
return isset($this->config['deleteChunksOnSave']) ? $this->config['deleteChunksOnSave'] : true;
}
/**
* Generate chunk identifier
*
* @param RequestInterface $request
*
* @return string
*/
public static function hashNameCallback(RequestInterface $request) {
return sha1($request
->getIdentifier());
}
}
Members
Name![]() |
Modifiers | Type | Description | Overrides |
---|---|---|---|---|
Config:: |
private | property | Config | |
Config:: |
public | function |
Delete chunks on save Overrides ConfigInterface:: |
|
Config:: |
public | function |
Generate chunk identifier Overrides ConfigInterface:: |
|
Config:: |
public | function |
Callback to pre-process chunk Overrides ConfigInterface:: |
|
Config:: |
public | function |
Get path to temporary directory for chunks storage Overrides ConfigInterface:: |
|
Config:: |
public static | function | Generate chunk identifier | |
Config:: |
public | function |
Delete chunks on save Overrides ConfigInterface:: |
|
Config:: |
public | function | Set chunk identifier | |
Config:: |
public | function |
Callback to pre-process chunk Overrides ConfigInterface:: |
|
Config:: |
public | function | Set path to temporary directory for chunks storage | |
Config:: |
public | function | Controller | 1 |