PHP Class Flarum\Extension\Extension

Inheritance: implements Illuminate\Contracts\Support\Arrayable
Afficher le fichier Open project: flarum/core Class Usage Examples

Protected Properties

Свойство Type Description
$composerJson array Composer json of the package.
$enabled boolean Whether the extension is enabled.
$id string Unique Id of the extension.
$installed boolean Whether the extension is installed.
$path string The directory of this extension.
$version string The installed version of the extension.

Méthodes publiques

Méthode Description
__construct ( $path, array $composerJson )
__get ( $name )
__isset ( $name )
composerJsonAttribute ( $name ) : mixed Dot notation getter for composer.json attributes.
getIcon ( ) : array | null Loads the icon information from the composer.json.
getId ( ) : string The raw path of the directory under extensions.
getPath ( ) : string
getVersion ( ) : string
hasAssets ( ) : boolean Tests whether the extension has assets.
hasMigrations ( ) : boolean Tests whether the extension has migrations.
isEnabled ( ) : boolean
isInstalled ( ) : boolean
setEnabled ( boolean $enabled ) : Extension
setInstalled ( boolean $installed ) : Extension
setVersion ( string $version ) : Extension
toArray ( ) : array Generates an array result for the object.

Méthodes protégées

Méthode Description
assignId ( ) Assigns the id for the extension used globally.

Method Details

__construct() public méthode

public __construct ( $path, array $composerJson )
$path
$composerJson array

__get() public méthode

public __get ( $name )

__isset() public méthode

public __isset ( $name )

assignId() protected méthode

Assigns the id for the extension used globally.
protected assignId ( )

composerJsonAttribute() public méthode

Dot notation getter for composer.json attributes.
See also: https://laravel.com/docs/5.1/helpers#arrays
public composerJsonAttribute ( $name ) : mixed
$name
Résultat mixed

getIcon() public méthode

Loads the icon information from the composer.json.
public getIcon ( ) : array | null
Résultat array | null

getId() public méthode

The raw path of the directory under extensions.
public getId ( ) : string
Résultat string

getPath() public méthode

public getPath ( ) : string
Résultat string

getVersion() public méthode

public getVersion ( ) : string
Résultat string

hasAssets() public méthode

Tests whether the extension has assets.
public hasAssets ( ) : boolean
Résultat boolean

hasMigrations() public méthode

Tests whether the extension has migrations.
public hasMigrations ( ) : boolean
Résultat boolean

isEnabled() public méthode

public isEnabled ( ) : boolean
Résultat boolean

isInstalled() public méthode

public isInstalled ( ) : boolean
Résultat boolean

setEnabled() public méthode

public setEnabled ( boolean $enabled ) : Extension
$enabled boolean
Résultat Extension

setInstalled() public méthode

public setInstalled ( boolean $installed ) : Extension
$installed boolean
Résultat Extension

setVersion() public méthode

public setVersion ( string $version ) : Extension
$version string
Résultat Extension

toArray() public méthode

Generates an array result for the object.
public toArray ( ) : array
Résultat array

Property Details

$composerJson protected_oe property

Composer json of the package.
protected array $composerJson
Résultat array

$enabled protected_oe property

Whether the extension is enabled.
protected bool $enabled
Résultat boolean

$id protected_oe property

Unique Id of the extension.
protected string $id
Résultat string

$installed protected_oe property

Whether the extension is installed.
protected bool $installed
Résultat boolean

$path protected_oe property

The directory of this extension.
protected string $path
Résultat string

$version protected_oe property

The installed version of the extension.
protected string $version
Résultat string