eZPublish(LegacyStack)  5.1
eZContentUploadHandler Class Referenceabstract

Interface for all content upload handlers. More...

Public Member Functions

 eZContentUploadHandler ($name, $identifier)
 
 handleFile (&$upload, &$result, $filePath, $originalFilename, $mimeInfo, $location, $existingNode)
 

Public Attributes

 $Identifier
 The identifier of the handler. More...
 
 $Name
 The name of the handler, can be displayed to the end user. More...
 

Detailed Description

Interface for all content upload handlers.

This defines the interface for upload handlers for content objects. The handler will be used if upload.ini is configured for a specific MIME type. The uploading system is general and will be used both by Web uploads as well as WebDAV PUT requests.

The handler must inherit this class and implement the following methods:

  • handleFile() - This takes care of creating content objects from the uploaded file.

Also the constructor must pass a proper name and identifier to the eZContentUploadHandler.

Member Function Documentation

eZContentUploadHandler::eZContentUploadHandler (   $name,
  $identifier 
)

Initialises the handler with the name.

eZContentUploadHandler::handleFile ( $upload,
$result,
  $filePath,
  $originalFilename,
  $mimeInfo,
  $location,
  $existingNode 
)
pure virtual

Handles the file $filePath and creates one ore more content objects.

Parameters
$uploadThe eZContentUpload object that instantiated the request, public methods on this can be used.
$filePathPath to file which should be stored, do not remove or move this file.
$mimeInfoContains MIME-Type information on the file.
$resultResult data, will be filled with information which the client can examine, contains:
  • errors - An array with errors, each element is an array with 'description' containing the text
$locationThe node ID which the new object will be placed or the string 'auto' for automatic placement of type.
$existingNodePass a contentobjecttreenode object to let the uploading be done to an existing object, if not it will create one from scratch.
Returns
false if something failed or true if succesful.
Note
might be transaction unsafe.

Member Data Documentation

eZContentUploadHandler::$Identifier

The identifier of the handler.

eZContentUploadHandler::$Name

The name of the handler, can be displayed to the end user.


The documentation for this class was generated from the following file: