You are here

class Uploader in N1ED - Visual editor as CKEditor plugin with Bootstrap support 7

Hierarchy

  • class \EdSDK\FileUploaderServer\lib\Uploader

Expanded class hierarchy of Uploader

1 file declares its use of Uploader
UploaderServlet.php in vendor/edsdk/file-uploader-server-php/src/servlet/UploaderServlet.php

File

vendor/edsdk/file-uploader-server-php/src/lib/Uploader.php, line 16

Namespace

EdSDK\FileUploaderServer\lib
View source
class Uploader {
  protected $m_actions;
  protected $m_config;
  public function __construct($config, $actions) {
    $this->m_config = $config;
    $this->m_actions = $actions;
  }
  public function run($req) {
    $actionName = $req->action;
    $action = $this->m_actions
      ->getAction($actionName);
    if ($action === null) {
      $action = $this->m_actions
        ->getActionError();
      $req = ReqError::createReqError(Message::createMessage(Message::ACTION_NOT_FOUND));
    }
    $action
      ->setConfig($this->m_config);
    $resp = null;
    try {
      $resp = $action
        ->run($req);
    } catch (MessageException $e) {
      $resp = new RespFail($e
        ->getFailMessage());
    }
    return $resp;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
Uploader::$m_actions protected property
Uploader::$m_config protected property
Uploader::run public function
Uploader::__construct public function