PHP Класс Flarum\Extension\ExtensionManager

Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$app
$config
$dispatcher Illuminate\Contracts\Events\Dispatcher
$extensions Illuminate\Support\Collection | null
$filesystem Illuminate\Filesystem\Filesystem
$migrator

Открытые методы

Метод Описание
__construct ( Flarum\Settings\SettingsRepositoryInterface $config, Application $app, Flarum\Database\Migrator $migrator, Illuminate\Contracts\Events\Dispatcher $dispatcher, Illuminate\Filesystem\Filesystem $filesystem )
disable ( string $name ) Disables an extension.
enable ( string $name ) Enables the extension.
getAsset ( Extension $extension, string $path ) : string Get the path to an extension's published asset.
getEnabled ( ) : array The id's of the enabled extensions.
getEnabledBootstrappers ( ) : Collection Loads all bootstrap.php files of the enabled extensions.
getEnabledExtensions ( ) : Collection Get only enabled extensions.
getExtension ( string $name ) : Extension | null Loads an Extension with all information.
getExtensions ( ) : Collection
getMigrator ( ) : Flarum\Database\Migrator The database migrator.
isEnabled ( $extension ) : boolean Whether the extension is enabled.
migrate ( Extension $extension, boolean | true $up = true ) Runs the database migrations for the extension.
migrateDown ( Extension $extension ) Runs the database migrations to reset the database to its old state.
uninstall ( string $name ) Uninstalls an extension.

Защищенные методы

Метод Описание
getExtensionsDir ( ) : string The extensions path.
publishAssets ( Extension $extension ) Copy the assets from an extension's assets directory into public view.
setEnabled ( array $enabled ) Persist the currently enabled extensions.
unpublishAssets ( Extension $extension ) Delete an extension's assets from public view.

Описание методов

__construct() публичный Метод

public __construct ( Flarum\Settings\SettingsRepositoryInterface $config, Application $app, Flarum\Database\Migrator $migrator, Illuminate\Contracts\Events\Dispatcher $dispatcher, Illuminate\Filesystem\Filesystem $filesystem )
$config Flarum\Settings\SettingsRepositoryInterface
$app Flarum\Foundation\Application
$migrator Flarum\Database\Migrator
$dispatcher Illuminate\Contracts\Events\Dispatcher
$filesystem Illuminate\Filesystem\Filesystem

disable() публичный Метод

Disables an extension.
public disable ( string $name )
$name string

enable() публичный Метод

Enables the extension.
public enable ( string $name )
$name string

getAsset() публичный Метод

Get the path to an extension's published asset.
public getAsset ( Extension $extension, string $path ) : string
$extension Extension
$path string
Результат string

getEnabled() публичный Метод

The id's of the enabled extensions.
public getEnabled ( ) : array
Результат array

getEnabledBootstrappers() публичный Метод

Loads all bootstrap.php files of the enabled extensions.
public getEnabledBootstrappers ( ) : Collection
Результат Illuminate\Support\Collection

getEnabledExtensions() публичный Метод

Get only enabled extensions.
public getEnabledExtensions ( ) : Collection
Результат Illuminate\Support\Collection

getExtension() публичный Метод

Loads an Extension with all information.
public getExtension ( string $name ) : Extension | null
$name string
Результат Extension | null

getExtensions() публичный Метод

public getExtensions ( ) : Collection
Результат Illuminate\Support\Collection

getExtensionsDir() защищенный Метод

The extensions path.
protected getExtensionsDir ( ) : string
Результат string

getMigrator() публичный Метод

The database migrator.
public getMigrator ( ) : Flarum\Database\Migrator
Результат Flarum\Database\Migrator

isEnabled() публичный Метод

Whether the extension is enabled.
public isEnabled ( $extension ) : boolean
$extension
Результат boolean

migrate() публичный Метод

Runs the database migrations for the extension.
public migrate ( Extension $extension, boolean | true $up = true )
$extension Extension
$up boolean | true

migrateDown() публичный Метод

Runs the database migrations to reset the database to its old state.
public migrateDown ( Extension $extension )
$extension Extension

publishAssets() защищенный Метод

Copy the assets from an extension's assets directory into public view.
protected publishAssets ( Extension $extension )
$extension Extension

setEnabled() защищенный Метод

Persist the currently enabled extensions.
protected setEnabled ( array $enabled )
$enabled array

uninstall() публичный Метод

Uninstalls an extension.
public uninstall ( string $name )
$name string

unpublishAssets() защищенный Метод

Delete an extension's assets from public view.
protected unpublishAssets ( Extension $extension )
$extension Extension

Описание свойств

$app защищенное свойство

protected $app

$config защищенное свойство

protected $config

$dispatcher защищенное свойство

protected Dispatcher,Illuminate\Contracts\Events $dispatcher
Результат Illuminate\Contracts\Events\Dispatcher

$extensions защищенное свойство

protected Collection,Illuminate\Support|null $extensions
Результат Illuminate\Support\Collection | null

$filesystem защищенное свойство

protected Filesystem,Illuminate\Filesystem $filesystem
Результат Illuminate\Filesystem\Filesystem

$migrator защищенное свойство

protected $migrator