Class humhub\modules\file\handler\FileHandlerCollection

Inheritancehumhub\modules\file\handler\FileHandlerCollection » yii\base\Component
Available since version1.2

FileHandlerCollection

Protected Methods

Hide inherited methods

MethodDescriptionDefined By
sortHandler() Sorts the registered handlers humhub\modules\file\handler\FileHandlerCollection

Events

Hide inherited events

EventTypeDescriptionDefined By
EVENT_INIT \humhub\modules\file\handler\the Init event - use to register file handlers humhub\modules\file\handler\FileHandlerCollection

Property Details

$file public property
$handlers public property
public \humhub\modules\file\handler\type $handlers = []
$type public property

Current collection type

public string $type null

Method Details

getByType() public static method

Returns registered handlers by type

public static humhub\modules\file\handler\BaseFileHandler[] getByType ( $types, $file null )
$types
$file humhub\modules\file\models\File

The file (optional)

return humhub\modules\file\handler\BaseFileHandler[]

The registered handlers

init() public method

public void init ( )
register() public method

public void register ( humhub\modules\file\handler\BaseFileHandler $handler )
$handler \humhub\modules\file\components\BaseFileHandler
sortHandler() protected method

Sorts the registered handlers

protected void sortHandler ( )

Event Details

EVENT_INIT event of type \humhub\modules\file\handler\the

Init event - use to register file handlers