eZ Publish  [trunk]
eZContentUploadHandler Class Reference

Interface for all content upload handlers. More...

List of all members.

Public Member Functions

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

Public Attributes

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

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.

Definition at line 27 of file ezcontentuploadhandler.php.


Member Function Documentation

eZContentUploadHandler::eZContentUploadHandler ( name,
identifier 
)

Initialises the handler with the name.

Definition at line 32 of file ezcontentuploadhandler.php.

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.

Definition at line 54 of file ezcontentuploadhandler.php.


Member Data Documentation

eZContentUploadHandler::$Identifier

The identifier of the handler.

Definition at line 65 of file ezcontentuploadhandler.php.

eZContentUploadHandler::$Name

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

Definition at line 63 of file ezcontentuploadhandler.php.


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