/** * Constructor. * * @param string field name * @param string realpath for destination */ public function __construct($field = 'files', $destination = null) { $this->field = $field; if (is_null($destination)) { $destination = Application::basepath() . '/uploads'; } $this->setDestination($destination); }