PHP Class Karlomikus\Theme\Theme

Author: Karlo Mikuš
Inheritance: implements Karlomikus\Theme\Contracts\ThemeInterface
Afficher le fichier Open project: karlomikus/theme

Méthodes publiques

Méthode Description
__construct ( Illuminate\Contracts\Container\Container $app ) Setup default view finder and view paths.
all ( ) : array | ThemeInfo[] Get all found themes
get ( $theme = null ) : null | ThemeInfo Returns theme information.
getThemes ( )
has ( $theme ) : boolean Check if theme exists
set ( string $theme ) Set current active theme
setDefaultThemePath ( $path ) Set base themes folder path
themeExists ( $theme )

Private Methods

Méthode Description
findPath ( $namespace ) : string Find theme views path
findThemeByNamespace ( string $namespace ) : null | ThemeInfo Find a theme from all scanned themes
loadTheme ( string $theme ) Load a theme
parseThemeInfo ( array $info ) : ThemeInfoInterface Parse theme json file
scanThemes ( ) Scan for all available themes

Method Details

__construct() public méthode

Setup default view finder and view paths.
public __construct ( Illuminate\Contracts\Container\Container $app )
$app Illuminate\Contracts\Container\Container

all() public méthode

Get all found themes
public all ( ) : array | ThemeInfo[]
Résultat array | ThemeInfo[]

get() public méthode

Returns theme information.
public get ( $theme = null ) : null | ThemeInfo
Résultat null | ThemeInfo

getThemes() public méthode

public getThemes ( )

has() public méthode

Check if theme exists
public has ( $theme ) : boolean
$theme
Résultat boolean

set() public méthode

Set current active theme
public set ( string $theme )
$theme string Theme namespace

setDefaultThemePath() public méthode

Set base themes folder path
public setDefaultThemePath ( $path )
$path

themeExists() public méthode

public themeExists ( $theme )