PHP 클래스 Nwidart\Modules\Repository

상속: implements Nwidart\Modules\Contracts\RepositoryInterface, implements Countabl\Countable
파일 보기 프로젝트 열기: nwidart/laravel-modules 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$app Illuminate\Foundation\Application Application instance.
$path string | null The module path.
$paths array The scanned paths.
$stubPath string

공개 메소드들

메소드 설명
__construct ( Illuminate\Foundation\Application $app, string | null $path = null ) The constructor.
active ( string $name ) : boolean Determine whether the given module is activated.
addLocation ( string $path ) Add other module location.
addPath ( string $path ) Alternative method for "addPath".
all ( ) : array Get all modules.
asset ( string $asset ) : string Get asset url from a specific module.
assetPath ( $module ) : string Get asset path for a specific module.
boot ( ) Boot the modules.
collections ( ) : Collection Get all modules as laravel collection instance.
config ( $key, null $default = null ) : mixed Get a specific config data from a configuration file.
count ( ) : integer Get count from all modules.
delete ( string $name ) : boolean Delete a specific module.
disable ( string $name ) : boolean Disabling a specific module.
disabled ( ) : array Get list of disabled modules.
enable ( string $name ) : boolean Enabling a specific module.
enabled ( ) : array Get list of enabled modules.
find ( $name ) : mixed | void Find a specific module.
findOrFail ( $name ) : Module Find a specific module, if there return that, otherwise throw exception.
get ( $name ) : mixed | void Alternative for "find" method.
getAssetsPath ( ) : string Get module assets path.
getByStatus ( $status ) : array Get modules by status.
getCached ( ) : array Get cached modules.
getFiles ( ) : Illuminate\Filesystem\Filesystem Get laravel filesystem instance.
getModulePath ( $module ) : string Get module path for a specific module.
getOrdered ( string $direction = 'asc' ) : array Get all ordered modules.
getPath ( ) : string Get a module path.
getPaths ( ) : array Get all additional paths.
getScanPaths ( ) : array Get scanned modules paths.
getStubPath ( ) : string Get stub path.
getUsed ( ) : string Get used now.
getUsedNow ( ) : string Get module used for cli session.
getUsedStoragePath ( ) : string Get storage path for module used.
has ( $name ) : boolean Determine whether the given module exist.
install ( string $name, string $version = 'dev-master', string $type = 'composer', boolean $subtree = false ) : Process Install the specified module.
notActive ( string $name ) : boolean Determine whether the given module is not activated.
register ( ) Register the modules.
scan ( ) : array Get & scan all modules.
setStubPath ( string $stubPath ) Set stub path.
setUsed ( $name ) Set module used for cli session.
toCollection ( ) : Collection Get all modules as collection instance.
update ( string $module ) Update dependencies for the specified module.

보호된 메소드들

메소드 설명
formatCached ( array $cached ) : array Format the cached data as array of modules.

메소드 상세

__construct() 공개 메소드

The constructor.
public __construct ( Illuminate\Foundation\Application $app, string | null $path = null )
$app Illuminate\Foundation\Application
$path string | null

active() 공개 메소드

Determine whether the given module is activated.
public active ( string $name ) : boolean
$name string
리턴 boolean

addLocation() 공개 메소드

Add other module location.
public addLocation ( string $path )
$path string

addPath() 공개 메소드

Alternative method for "addPath".
public addPath ( string $path )
$path string

all() 공개 메소드

Get all modules.
public all ( ) : array
리턴 array

asset() 공개 메소드

Get asset url from a specific module.
public asset ( string $asset ) : string
$asset string
리턴 string

assetPath() 공개 메소드

Get asset path for a specific module.
public assetPath ( $module ) : string
$module
리턴 string

boot() 공개 메소드

Boot the modules.
public boot ( )

collections() 공개 메소드

Get all modules as laravel collection instance.
public collections ( ) : Collection
리턴 Collection

config() 공개 메소드

Get a specific config data from a configuration file.
public config ( $key, null $default = null ) : mixed
$key
$default null
리턴 mixed

count() 공개 메소드

Get count from all modules.
public count ( ) : integer
리턴 integer

delete() 공개 메소드

Delete a specific module.
public delete ( string $name ) : boolean
$name string
리턴 boolean

disable() 공개 메소드

Disabling a specific module.
public disable ( string $name ) : boolean
$name string
리턴 boolean

disabled() 공개 메소드

Get list of disabled modules.
public disabled ( ) : array
리턴 array

enable() 공개 메소드

Enabling a specific module.
public enable ( string $name ) : boolean
$name string
리턴 boolean

enabled() 공개 메소드

Get list of enabled modules.
public enabled ( ) : array
리턴 array

find() 공개 메소드

Find a specific module.
public find ( $name ) : mixed | void
$name
리턴 mixed | void

findOrFail() 공개 메소드

Find a specific module, if there return that, otherwise throw exception.
public findOrFail ( $name ) : Module
$name
리턴 Module

formatCached() 보호된 메소드

Format the cached data as array of modules.
protected formatCached ( array $cached ) : array
$cached array
리턴 array

get() 공개 메소드

Alternative for "find" method.
public get ( $name ) : mixed | void
$name
리턴 mixed | void

getAssetsPath() 공개 메소드

Get module assets path.
public getAssetsPath ( ) : string
리턴 string

getByStatus() 공개 메소드

Get modules by status.
public getByStatus ( $status ) : array
$status
리턴 array

getCached() 공개 메소드

Get cached modules.
public getCached ( ) : array
리턴 array

getFiles() 공개 메소드

Get laravel filesystem instance.
public getFiles ( ) : Illuminate\Filesystem\Filesystem
리턴 Illuminate\Filesystem\Filesystem

getModulePath() 공개 메소드

Get module path for a specific module.
public getModulePath ( $module ) : string
$module
리턴 string

getOrdered() 공개 메소드

Get all ordered modules.
public getOrdered ( string $direction = 'asc' ) : array
$direction string
리턴 array

getPath() 공개 메소드

Get a module path.
public getPath ( ) : string
리턴 string

getPaths() 공개 메소드

Get all additional paths.
public getPaths ( ) : array
리턴 array

getScanPaths() 공개 메소드

Get scanned modules paths.
public getScanPaths ( ) : array
리턴 array

getStubPath() 공개 메소드

Get stub path.
public getStubPath ( ) : string
리턴 string

getUsed() 공개 메소드

Get used now.
public getUsed ( ) : string
리턴 string

getUsedNow() 공개 메소드

Get module used for cli session.
public getUsedNow ( ) : string
리턴 string

getUsedStoragePath() 공개 메소드

Get storage path for module used.
public getUsedStoragePath ( ) : string
리턴 string

has() 공개 메소드

Determine whether the given module exist.
public has ( $name ) : boolean
$name
리턴 boolean

install() 공개 메소드

Install the specified module.
public install ( string $name, string $version = 'dev-master', string $type = 'composer', boolean $subtree = false ) : Process
$name string
$version string
$type string
$subtree boolean
리턴 Symfony\Component\Process\Process

notActive() 공개 메소드

Determine whether the given module is not activated.
public notActive ( string $name ) : boolean
$name string
리턴 boolean

register() 공개 메소드

Register the modules.
public register ( )

scan() 공개 메소드

Get & scan all modules.
public scan ( ) : array
리턴 array

setStubPath() 공개 메소드

Set stub path.
public setStubPath ( string $stubPath )
$stubPath string

setUsed() 공개 메소드

Set module used for cli session.
public setUsed ( $name )
$name

toCollection() 공개 메소드

Get all modules as collection instance.
public toCollection ( ) : Collection
리턴 Collection

update() 공개 메소드

Update dependencies for the specified module.
public update ( string $module )
$module string

프로퍼티 상세

$app 보호되어 있는 프로퍼티

Application instance.
protected Application,Illuminate\Foundation $app
리턴 Illuminate\Foundation\Application

$path 보호되어 있는 프로퍼티

The module path.
protected string|null $path
리턴 string | null

$paths 보호되어 있는 프로퍼티

The scanned paths.
protected array $paths
리턴 array

$stubPath 보호되어 있는 프로퍼티

protected string $stubPath
리턴 string