Exponential 6.0.13 Exponential Enterprise Open Source CMS - PHP Class Reference

Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
eZBinaryFileHandler Class Reference

Interface for all binary file handlers. More...

Inheritance diagram for eZBinaryFileHandler:

## Public Member Functions
| __construct ( $identifier, $name, $handleType)
| attributes ()
| hasAttribute ( $attribute)
| attribute ( $attribute)
| viewTemplate ( $contentobjectAttribute)
| editTemplate ( $contentobjectAttribute)
| informationTemplate ( $contentobjectAttribute)
| handleUpload ()
| downloadFileObject ( $contentObject, $contentObjectAttribute)
| handleDownload ( $contentObject, $contentObjectAttribute, $type)
| handleFileDownload ( $contentObject, $contentObjectAttribute, $type, $mimeData)
| repositories ()

## Static Public Member Functions
static | instance ( $identifier=false)

## Public Attributes
const | HANDLE_UPLOAD = 0x1
const | HANDLE_DOWNLOAD = 0x2
const | HANDLE_ALL = 0x3
const | TYPE_FILE = 'file'
const | TYPE_MEDIA = 'media'
const | RESULT_OK = 1
const | RESULT_UNAVAILABLE = 2
| $Info

## Detailed Description

Interface for all binary file handlers.

Definition at line 22 of file ezbinaryfilehandler.php.

## Constructor & Destructor Documentation

## ◆ __construct()

eZBinaryFileHandler::__construct | ( |  | $identifier,
|  |  | $name,
|  |  | $handleType
| ) |  |

Constructor

Parameters

  string | $identifier |
  string | $name |
  string | $handleType |

Definition at line 42 of file ezbinaryfilehandler.php.

## Member Function Documentation

## ◆ attribute()

eZBinaryFileHandler::attribute | ( |  | $attribute | ) |

Definition at line 60 of file ezbinaryfilehandler.php.

References eZDebug\writeError().

## ◆ attributes()

eZBinaryFileHandler::attributes | ( |  | ) |

Definition at line 50 of file ezbinaryfilehandler.php.

## ◆ downloadFileObject()

eZBinaryFileHandler::downloadFileObject | ( |  | $contentObject,
|  |  | $contentObjectAttribute
| ) |  |

Returns
  the file object which corresponds to $contentObject and $contentObjectAttribute.

Definition at line 109 of file ezbinaryfilehandler.php.

References eZMedia\fetch(), and eZBinaryFile\fetch().

## ◆ editTemplate()

eZBinaryFileHandler::editTemplate | ( |  | $contentobjectAttribute | ) |

Returns
  the suffix for the template name which will be used for attribute viewing.

Note
  Default returns false which means no special template.

Definition at line 85 of file ezbinaryfilehandler.php.

## ◆ handleDownload()

eZBinaryFileHandler::handleDownload | ( |  | $contentObject,
|  |  | $contentObjectAttribute,
|  |  | $type
| ) |  |

Definition at line 120 of file ezbinaryfilehandler.php.

References handleFileDownload(), and RESULT_UNAVAILABLE.

## ◆ handleFileDownload()

eZBinaryFileHandler::handleFileDownload | ( |  | $contentObject,
|  |  | $contentObjectAttribute,
|  |  | $type,
|  |  | $mimeData
| ) |  |

Reimplemented in eZFilePassthroughHandler.

Definition at line 144 of file ezbinaryfilehandler.php.

Referenced by handleDownload().

## ◆ handleUpload()

eZBinaryFileHandler::handleUpload | ( |  | ) |

Definition at line 101 of file ezbinaryfilehandler.php.

## ◆ hasAttribute()

eZBinaryFileHandler::hasAttribute | ( |  | $attribute | ) |

Definition at line 55 of file ezbinaryfilehandler.php.

## ◆ informationTemplate()

eZBinaryFileHandler::informationTemplate | ( |  | $contentobjectAttribute | ) |

Returns
  the suffix for the template name which will be used for attribute viewing.

Note
  Default returns false which means no special template.

Definition at line 95 of file ezbinaryfilehandler.php.

## ◆ instance()

static eZBinaryFileHandler::instance | ( |  | $identifier = `false` | ) |
| static

Returns a shared instance of the eZBinaryFileHandler class pr $handlerName as defined in file.ini[BinaryFileSettings]Handler

Parameters

  string | false | $identifier | Uses file.ini[BinaryFileSettings]Handler if false

Returns
  eZBinaryFileHandler

Definition at line 161 of file ezbinaryfilehandler.php.

References eZExtension\getHandlerClass(), and eZDebug\writeError().

Referenced by eZBinaryFileType\fileHandler().

## ◆ repositories()

eZBinaryFileHandler::repositories | ( |  | ) |

Definition at line 149 of file ezbinaryfilehandler.php.

## ◆ viewTemplate()

eZBinaryFileHandler::viewTemplate | ( |  | $contentobjectAttribute | ) |

Returns
  the suffix for the template name which will be used for attribute viewing.

Note
  Default returns false which means no special template.

Definition at line 75 of file ezbinaryfilehandler.php.

## Member Data Documentation

## ◆ $Info

eZBinaryFileHandler::$Info

Definition at line 188 of file ezbinaryfilehandler.php.

## ◆ HANDLE_ALL

const eZBinaryFileHandler::HANDLE_ALL = 0x3

Definition at line 27 of file ezbinaryfilehandler.php.

## ◆ HANDLE_DOWNLOAD

const eZBinaryFileHandler::HANDLE_DOWNLOAD = 0x2

Definition at line 25 of file ezbinaryfilehandler.php.

Referenced by eZFilePassthroughHandler\__construct().

## ◆ HANDLE_UPLOAD

const eZBinaryFileHandler::HANDLE_UPLOAD = 0x1

Definition at line 24 of file ezbinaryfilehandler.php.

## ◆ RESULT_OK

const eZBinaryFileHandler::RESULT_OK = 1

Definition at line 32 of file ezbinaryfilehandler.php.

## ◆ RESULT_UNAVAILABLE

const eZBinaryFileHandler::RESULT_UNAVAILABLE = 2

Definition at line 33 of file ezbinaryfilehandler.php.

Referenced by handleDownload(), and eZFilePassthroughHandler\handleFileDownload().

## ◆ TYPE_FILE

const eZBinaryFileHandler::TYPE_FILE = 'file'

Definition at line 29 of file ezbinaryfilehandler.php.

## ◆ TYPE_MEDIA

const eZBinaryFileHandler::TYPE_MEDIA = 'media'

Definition at line 30 of file ezbinaryfilehandler.php.

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

- ezbinaryfilehandler.php

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