PHP Class Nwidart\Modules\Module

Inheritance: extends Illuminate\Support\ServiceProvider
Mostra file Open project: nwidart/laravel-modules Class Usage Examples

Protected Properties

Property Type Description
$app Illuminate\Foundation\Application The laravel application instance.
$name The module name.
$path string The module path,.

Public Methods

Method Description
__construct ( Illuminate\Foundation\Application $app, $name, $path ) The constructor.
__get ( $key ) : mixed Handle call to __get method.
__toString ( ) : string Handle call __toString.
active ( ) : boolean Alternate for "enabled" method.
boot ( ) Bootstrap the application events.
delete ( ) : boolean Delete the current module.
disable ( ) : boolean Disable the current module.
disabled ( ) : boolean Alias for "notActive" method.
enable ( ) Enable the current module.
enabled ( ) : boolean Determine whether the current module activated.
get ( $key, null $default = null ) : mixed Get a specific data from json file by given the key.
getAlias ( ) : string Get alias.
getComposerAttr ( $key, null $default = null ) : mixed Get a specific data from composer.json file by given the key.
getDescription ( ) : string Get description.
getExtraPath ( $path ) : string Get extra path.
getLaravel ( ) : Illuminate\Foundation\Application Get laravel instance.
getLowerName ( ) : string Get name in lower case.
getName ( ) : string Get name.
getPath ( ) : string Get path.
getPriority ( ) : string Get priority.
getStudlyName ( ) : string Get name in studly case.
isStatus ( $status ) : boolean Determine whether the given status same with the current module status.
json ( $file = null ) : Json Get json contents.
notActive ( ) : boolean Determine whether the current module not activated.
register ( ) Register the module.
setActive ( $active ) : boolean Set active state for current module.
setPath ( string $path ) Set path.

Protected Methods

Method Description
fireEvent ( string $event ) Register the module event.
registerAliases ( ) Register the aliases from this module.
registerFiles ( ) Register the files from this module.
registerProviders ( ) Register the service providers from this module.
registerTranslation ( ) : void Register module's translation.

Method Details

__construct() public method

The constructor.
public __construct ( Illuminate\Foundation\Application $app, $name, $path )
$app Illuminate\Foundation\Application
$name
$path

__get() public method

Handle call to __get method.
public __get ( $key ) : mixed
$key
return mixed

__toString() public method

Handle call __toString.
public __toString ( ) : string
return string

active() public method

Alternate for "enabled" method.
public active ( ) : boolean
return boolean

boot() public method

Bootstrap the application events.
public boot ( )

delete() public method

Delete the current module.
public delete ( ) : boolean
return boolean

disable() public method

Disable the current module.
public disable ( ) : boolean
return boolean

disabled() public method

Alias for "notActive" method.
public disabled ( ) : boolean
return boolean

enable() public method

Enable the current module.
public enable ( )

enabled() public method

Determine whether the current module activated.
public enabled ( ) : boolean
return boolean

fireEvent() protected method

Register the module event.
protected fireEvent ( string $event )
$event string

get() public method

Get a specific data from json file by given the key.
public get ( $key, null $default = null ) : mixed
$key
$default null
return mixed

getAlias() public method

Get alias.
public getAlias ( ) : string
return string

getComposerAttr() public method

Get a specific data from composer.json file by given the key.
public getComposerAttr ( $key, null $default = null ) : mixed
$key
$default null
return mixed

getDescription() public method

Get description.
public getDescription ( ) : string
return string

getExtraPath() public method

Get extra path.
public getExtraPath ( $path ) : string
$path
return string

getLaravel() public method

Get laravel instance.
public getLaravel ( ) : Illuminate\Foundation\Application
return Illuminate\Foundation\Application

getLowerName() public method

Get name in lower case.
public getLowerName ( ) : string
return string

getName() public method

Get name.
public getName ( ) : string
return string

getPath() public method

Get path.
public getPath ( ) : string
return string

getPriority() public method

Get priority.
public getPriority ( ) : string
return string

getStudlyName() public method

Get name in studly case.
public getStudlyName ( ) : string
return string

isStatus() public method

Determine whether the given status same with the current module status.
public isStatus ( $status ) : boolean
$status
return boolean

json() public method

Get json contents.
public json ( $file = null ) : Json
return Json

notActive() public method

Determine whether the current module not activated.
public notActive ( ) : boolean
return boolean

register() public method

Register the module.
public register ( )

registerAliases() protected method

Register the aliases from this module.
protected registerAliases ( )

registerFiles() protected method

Register the files from this module.
protected registerFiles ( )

registerProviders() protected method

Register the service providers from this module.
protected registerProviders ( )

registerTranslation() protected method

Register module's translation.
protected registerTranslation ( ) : void
return void

setActive() public method

Set active state for current module.
public setActive ( $active ) : boolean
$active
return boolean

setPath() public method

Set path.
public setPath ( string $path )
$path string

Property Details

$app protected_oe property

The laravel application instance.
protected Application,Illuminate\Foundation $app
return Illuminate\Foundation\Application

$name protected_oe property

The module name.
protected $name

$path protected_oe property

The module path,.
protected string $path
return string