PHP 클래스 Flarum\Extension\ExtensionManager

파일 보기 프로젝트 열기: flarum/core 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$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