SaveController.php
34 * | _in_ / _out_ | Key/value pairs of serialized object ids and PersistentObject instances to save
35 * | _in_ `uploadDir` | The directory where attached files should be stored on the server (optional) (see SaveController::getUploadDir())
42 * Errors concerning single input fields are added to the session (the keys are the input field names)
105 if ($curRequestObject instanceof PersistentObject && ($curOid = ObjectId::parse($curOidStr)) != null
307 * @param $data An assoziative array with keys 'name', 'type', 'tmp_name' as contained in the php $_FILES array.
325 $message = $message->getText("Possible file upload attack: filename %0%.", array($data['name']));
344 // upload file (mimeTypes parameter is set to null, because the mime type is already checked by checkFile method)
357 * an assoziative array with keys 'name', 'type', 'tmp_name' as contained in the php $_FILES array.
saveUploadFile(ObjectId $oid, $valueName, array $data)
Save uploaded file.
Definition: SaveController.php:310
const STATE_CLEAN
Definition: PersistentObject.php:26
Controller is the base class of all controllers.
Definition: Controller.php:48
shouldOverride(ObjectId $oid, $valueName, $filename)
Determine what to do if a file with the same name already exists.
Definition: SaveController.php:402
ObjectId is the unique identifier of an object.
Definition: ObjectId.php:27
OptimisticLockException signals an exception when trying to create an optimistic lock.
Definition: OptimisticLockException.php:19
checkLanguageParameter()
Checks the language request parameter and adds an response error, if it is not contained in the Local...
Definition: Controller.php:315
ValidationException signals an exception in validation.
Definition: ValidationException.php:18
getUploadFilename(ObjectId $oid, $valueName, $filename)
Get the name for the uploaded file.
Definition: SaveController.php:388
checkFile(ObjectId $oid, $valueName, $filename, $mimeType=null)
Check if the file is valid for a given object value.
Definition: SaveController.php:374
static fromException(\Exception $ex)
Factory method for transforming an exception into an ApplicationError instance.
Definition: ApplicationError.php:144
static parse($oid)
Parse a serialized object id string into an ObjectId instance.
Definition: ObjectId.php:144
confirmSaveValue($node, $valueName, $newValue)
Confirm save action on given Node value.
Definition: SaveController.php:451
static isValid($oid)
Check if a serialized ObjectId has a valid syntax, the type is known and if the number of primary key...
Definition: ObjectId.php:132
static get($code, $data=null)
Factory method for retrieving a predefind error instance.
Definition: ApplicationError.php:120
PessimisticLockException signals an exception when trying to create an pessimistic lock...
Definition: PessimisticLockException.php:21
FileUtil provides basic support for file functionality like HTTP file upload.
Definition: FileUtil.php:22
getUploadDir(ObjectId $oid, $valueName)
Get the name of the directory to upload a file to and make shure that it exists.
Definition: SaveController.php:416
isFileUpload(array $data)
Check if the given data defines a file upload.
Definition: SaveController.php:361
SaveController is a controller that saves Node data.
Definition: SaveController.php:46
PersistentObject defines the interface of all persistent objects.
Definition: PersistentObject.php:24