class ActionUploadInit in N1ED - Visual editor as CKEditor plugin with Bootstrap support 7
Hierarchy
- class \EdSDK\FileUploaderServer\lib\action\AAction
- class \EdSDK\FileUploaderServer\lib\action\ActionUploadInit
Expanded class hierarchy of ActionUploadInit
1 file declares its use of ActionUploadInit
- Actions.php in vendor/
edsdk/ file-uploader-server-php/ src/ lib/ Actions.php
File
- vendor/
edsdk/ file-uploader-server-php/ src/ lib/ action/ ActionUploadInit.php, line 16
Namespace
EdSDK\FileUploaderServer\lib\actionView source
class ActionUploadInit extends AAction {
public function getName() {
return "uploadInit";
}
public function run($req) {
$alphabeth = "abcdefghijklmnopqrstuvwxyz0123456789";
do {
$id = "";
for ($i = 0; $i < 6; $i++) {
$charNumber = rand(0, strlen($alphabeth) - 1);
$id .= substr($alphabeth, $charNumber, 1);
}
$dir = $this->m_config
->getTmpDir() . "/" . $id;
} while (file_exists($dir));
if (!mkdir($dir)) {
throw new MessageException(Message::createMessage(Message::UNABLE_TO_CREATE_UPLOAD_DIR));
}
return new RespUploadInit($id, $this->m_config);
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
AAction:: |
protected | property | ||
AAction:: |
public | function | ||
AAction:: |
protected | function | ||
AAction:: |
protected | function | ||
AAction:: |
protected | function | ||
ActionUploadInit:: |
public | function |
Overrides AAction:: |
|
ActionUploadInit:: |
public | function |
Overrides AAction:: |