PHP Class Xinax\LaravelGettext\Composers\LanguageSelector

Author: Nicolás Daniel Palumbo
Show file Open project: xinax/laravel-gettext Class Usage Examples

Protected Properties

Property Type Description
$gettext Xinax\LaravelGettext\LaravelGettext
$labels array Labels

Public Methods

Method Description
__construct ( LaravelGettext $gettext, array $labels = [] )
__toString ( ) : string Convert to string
create ( LaravelGettext $gettext, array $labels = [] ) : LanguageSelector
render ( ) : string Renders the language selector

Method Details

__construct() public method

public __construct ( LaravelGettext $gettext, array $labels = [] )
$gettext Xinax\LaravelGettext\LaravelGettext
$labels array

__toString() public method

Convert to string
public __toString ( ) : string
return string

create() public static method

public static create ( LaravelGettext $gettext, array $labels = [] ) : LanguageSelector
$gettext Xinax\LaravelGettext\LaravelGettext
$labels array
return LanguageSelector

render() public method

Renders the language selector
public render ( ) : string
return string

Property Details

$gettext protected property

protected LaravelGettext,Xinax\LaravelGettext $gettext
return Xinax\LaravelGettext\LaravelGettext

$labels protected property

Labels
protected array $labels
return array