Exponential 6.0.13 Exponential Enterprise Open Source CMS - PHP Class Reference

Public Member Functions | Public Attributes | List of all members
eZContentUploadHandler Class Referenceabstract

Interface for all content upload handlers. More...

## Public Member Functions
| __construct ( $name, $identifier)
| eZContentUploadHandler ( $name, $identifier)
| handleFile (&$upload, &$result, $filePath, $originalFilename, $mimeInfo, $location, $existingNode)

## Public Attributes
| $Name
| $Identifier
| The identifier of the handler. 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.

Definition at line 27 of file ezcontentuploadhandler.php.

## Constructor & Destructor Documentation

## ◆ __construct()

eZContentUploadHandler::__construct | ( |  | $name,
|  |  | $identifier
| ) |  |

Initialises the handler with the name.

Parameters

  string | $name |
  string | $identifier |

Definition at line 35 of file ezcontentuploadhandler.php.

Referenced by eZContentUploadHandler().

## Member Function Documentation

## ◆ eZContentUploadHandler()

eZContentUploadHandler::eZContentUploadHandler | ( |  | $name,
|  |  | $identifier
| ) |  |

Deprecated:
  Use eZContentUploadHandler::__construct() instead

Parameters

  string | $name |
  string | $identifier |

Definition at line 46 of file ezcontentuploadhandler.php.

References __construct().

## ◆ handleFile()

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

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

Parameters

  $upload | The eZContentUpload object that instantiated the request, public methods on this can be used.
  $filePath | Path to file which should be stored, do not remove or move this file.
  $mimeInfo | Contains MIME-Type information on the file.
  $result | Result 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
  $location | The node ID which the new object will be placed or the string `'auto'` for automatic placement of type.
  $existingNode | Pass 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 67 of file ezcontentuploadhandler.php.

## Member Data Documentation

## ◆ $Identifier

eZContentUploadHandler::$Identifier

The identifier of the handler.

Definition at line 78 of file ezcontentuploadhandler.php.

## ◆ $Name

eZContentUploadHandler::$Name

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

Definition at line 76 of file ezcontentuploadhandler.php.

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

- ezcontentuploadhandler.php

Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.