PHP Class App\services\PluginManager

Show file Open project: printempw/blessing-skin-server Class Usage Examples

Protected Properties

Property Type Description
$app Illuminate\Contracts\Foundation\Application
$dispatcher Illuminate\Contracts\Events\Dispatcher
$filesystem Illuminate\Filesystem\Filesystem
$option App\Services\Repositories\OptionRepository
$plugins Illuminate\Support\Collection | null

Public Methods

Method Description
__construct ( Illuminate\Contracts\Foundation\Application $app, OptionRepository $option, Illuminate\Contracts\Events\Dispatcher $dispatcher, Illuminate\Filesystem\Filesystem $filesystem )
disable ( string $name ) Disables an plugin.
enable ( string $name ) Enables the plugin.
getEnabled ( ) : array The id's of the enabled plugins.
getEnabledBootstrappers ( ) : Collection Loads all bootstrap.php files of the enabled plugins.
getEnabledPlugins ( ) : Collection Get only enabled plugins.
getPlugin ( string $name ) : Plugin | null Loads an Plugin with all information.
getPlugins ( ) : Collection
isEnabled ( $plugin ) : boolean Whether the plugin is enabled.
uninstall ( string $name ) Uninstalls an plugin.

Protected Methods

Method Description
getPluginsDir ( ) : string The plugins path.
setEnabled ( array $enabled ) Persist the currently enabled plugins.

Method Details

__construct() public method

public __construct ( Illuminate\Contracts\Foundation\Application $app, OptionRepository $option, Illuminate\Contracts\Events\Dispatcher $dispatcher, Illuminate\Filesystem\Filesystem $filesystem )
$app Illuminate\Contracts\Foundation\Application
$option App\Services\Repositories\OptionRepository
$dispatcher Illuminate\Contracts\Events\Dispatcher
$filesystem Illuminate\Filesystem\Filesystem

disable() public method

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

enable() public method

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

getEnabled() public method

The id's of the enabled plugins.
public getEnabled ( ) : array
return array

getEnabledBootstrappers() public method

Loads all bootstrap.php files of the enabled plugins.
public getEnabledBootstrappers ( ) : Collection
return Illuminate\Support\Collection

getEnabledPlugins() public method

Get only enabled plugins.
public getEnabledPlugins ( ) : Collection
return Illuminate\Support\Collection

getPlugin() public method

Loads an Plugin with all information.
public getPlugin ( string $name ) : Plugin | null
$name string
return Plugin | null

getPlugins() public method

public getPlugins ( ) : Collection
return Illuminate\Support\Collection

getPluginsDir() protected method

The plugins path.
protected getPluginsDir ( ) : string
return string

isEnabled() public method

Whether the plugin is enabled.
public isEnabled ( $plugin ) : boolean
$plugin
return boolean

setEnabled() protected method

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

uninstall() public method

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

Property Details

$app protected property

protected Application,Illuminate\Contracts\Foundation $app
return Illuminate\Contracts\Foundation\Application

$dispatcher protected property

protected Dispatcher,Illuminate\Contracts\Events $dispatcher
return Illuminate\Contracts\Events\Dispatcher

$filesystem protected property

protected Filesystem,Illuminate\Filesystem $filesystem
return Illuminate\Filesystem\Filesystem

$option protected property

protected OptionRepository,App\Services\Repositories $option
return App\Services\Repositories\OptionRepository

$plugins protected property

protected Collection,Illuminate\Support|null $plugins
return Illuminate\Support\Collection | null