* @package tao */ abstract class tao_helpers_form_elements_GenerisAsyncFile extends tao_helpers_form_FormElement { public const WIDGET_ID = 'http://www.tao.lu/datatypes/WidgetDefinitions.rdf#GenerisAsyncFile'; /** * Short description of method setValue * * @access public * @author Jerome Bogaerts, * @param mixed value */ public function setValue($value) { if ($value instanceof tao_helpers_form_data_UploadFileDescription) { // The file is being uploaded. $this->value = $value; } elseif (!is_null($value)) { // The file has already been uploaded $this->value = new tao_helpers_form_data_StoredFileDescription($value); } else { // Empty file upload description, nothing was uploaded. $this->value = new tao_helpers_form_data_UploadFileDescription('', 0, '', ''); } } }