Exponential 5.x Kernel 7.5.40 Exponential New Stack (Symfony-based) Kernel — PHP Class Reference

Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
eZ\Publish\Core\IO\MimeTypeDetector\FileInfo Class Reference
Inheritance diagram for eZ\Publish\Core\IO\MimeTypeDetector\FileInfo:

## Public Member Functions
| __construct ()
| Checks for the required ext/fileinfo. More...
| getFromPath ($path)
| Returns the MIME type of the file identified by $path. More...
| getFromBuffer ($path)
| Returns the MIME type of the data in $buffer. More...

## Protected Member Functions
| getFileInfo ()
| Creates a new (or re-uses) finfo object and returns it. More...

## Protected Attributes
| $fileInfo

## Detailed Description

Definition at line 11 of file FileInfo.php.

## Constructor & Destructor Documentation

## ◆ __construct()

eZ\Publish\Core\IO\MimeTypeDetector\FileInfo::__construct | ( |  | ) |

Checks for the required ext/fileinfo.

Definition at line 23 of file FileInfo.php.

## Member Function Documentation

## ◆ getFileInfo()

eZ\Publish\Core\IO\MimeTypeDetector\FileInfo::getFileInfo | ( |  | ) |
| protected

Creates a new (or re-uses) finfo object and returns it.

Returns
  \finfo

Definition at line 47 of file FileInfo.php.

References eZ\Publish\Core\IO\MimeTypeDetector\FileInfo\$fileInfo.

Referenced by eZ\Publish\Core\IO\MimeTypeDetector\FileInfo\getFromBuffer(), and eZ\Publish\Core\IO\MimeTypeDetector\FileInfo\getFromPath().

## ◆ getFromBuffer()

eZ\Publish\Core\IO\MimeTypeDetector\FileInfo::getFromBuffer | ( |  | $buffer | ) |

Returns the MIME type of the data in $buffer.

Parameters

  string | $buffer |

Returns
  string

Implements eZ\Publish\SPI\IO\MimeTypeDetector.

Definition at line 37 of file FileInfo.php.

References eZ\Publish\Core\IO\MimeTypeDetector\FileInfo\getFileInfo().

## ◆ getFromPath()

eZ\Publish\Core\IO\MimeTypeDetector\FileInfo::getFromPath | ( |  | $path | ) |

Returns the MIME type of the file identified by $path.

Parameters

  string | $path |

Returns
  string

Implements eZ\Publish\SPI\IO\MimeTypeDetector.

Definition at line 32 of file FileInfo.php.

References eZ\Publish\Core\IO\MimeTypeDetector\FileInfo\getFileInfo().

## Member Data Documentation

## ◆ $fileInfo

eZ\Publish\Core\IO\MimeTypeDetector\FileInfo::$fileInfo
| protected

Definition at line 18 of file FileInfo.php.

Referenced by eZ\Publish\Core\IO\MimeTypeDetector\FileInfo\getFileInfo().

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

- FileInfo.php

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