PHP Class Flarum\Http\WebApp\AbstractWebApp

Show file Open project: flarum/core Class Usage Examples

Protected Properties

Property Type Description
$assets WebAppAssetsFactory
$locales Flarum\Locale\LocaleManager
$settings Flarum\Settings\SettingsRepositoryInterface
$view WebAppViewFactory

Public Methods

Method Description
__construct ( WebAppAssetsFactory $assets, WebAppViewFactory $view, Flarum\Settings\SettingsRepositoryInterface $settings, LocaleManager $locales )
getAssets ( ) : WebAppAssets
getView ( ) : WebAppView

Protected Methods

Method Description
getLayout ( ) : string Get the path to the client layout view.
getName ( ) : string Get the name of the client.
getTranslationFilter ( ) : string Get a regular expression to match against translation keys.

Private Methods

Method Description
addCustomLess ( WebAppView $view )
addDefaultAssets ( WebAppView $view )
addTranslations ( WebAppView $view )
filterTranslations ( array $translations ) : array Take a selection of keys from a collection of translations.
getLessVariables ( ) : array Get the values of any LESS variables to compile into the CSS, based on the forum's configuration.

Method Details

__construct() public method

public __construct ( WebAppAssetsFactory $assets, WebAppViewFactory $view, Flarum\Settings\SettingsRepositoryInterface $settings, LocaleManager $locales )
$assets WebAppAssetsFactory
$view WebAppViewFactory
$settings Flarum\Settings\SettingsRepositoryInterface
$locales Flarum\Locale\LocaleManager

getAssets() public method

public getAssets ( ) : WebAppAssets
return WebAppAssets

getLayout() protected method

Get the path to the client layout view.
protected getLayout ( ) : string
return string

getName() abstract protected method

Get the name of the client.
abstract protected getName ( ) : string
return string

getTranslationFilter() protected method

Get a regular expression to match against translation keys.
protected getTranslationFilter ( ) : string
return string

getView() public method

public getView ( ) : WebAppView
return WebAppView

Property Details

$assets protected property

protected WebAppAssetsFactory,Flarum\Http\WebApp $assets
return WebAppAssetsFactory

$locales protected property

protected LocaleManager,Flarum\Locale $locales
return Flarum\Locale\LocaleManager

$settings protected property

protected SettingsRepositoryInterface,Flarum\Settings $settings
return Flarum\Settings\SettingsRepositoryInterface

$view protected property

protected WebAppViewFactory,Flarum\Http\WebApp $view
return WebAppViewFactory