PHP Class Xinax\LaravelGettext\Config\Models\Config

Show file Open project: xinax/laravel-gettext Class Usage Examples

Protected Properties

Property Type Description
$adapter string The adapter class used to sync with laravel locale
$categories Locale categories
$customLocale Custom locale name Used when needed locales are unavalilable
$domain string Gettext domain
$encoding string Charset encoding for files
$fallbackLocale string Fallback locale
$handler Core translation handler
$keywordsList Poedit keywords list
$locale string Full ISO Locale (en_EN)
$project string Project identifier
$relativePath Default relative path
$sessionIdentifier string Session identifier
$sourcePaths array Source paths
$supportedLocales array Supported locales
$syncLaravel Sync with laravel locale
$translationsPath string Path to translation files
$translator string Translator contact data

Public Methods

Method Description
__construct ( )
getAdapter ( ) : string Gets the adapter class.
getAllDomains ( ) : array Return an array with all domain names
getCategories ( ) : array Gets categories
getCustomLocale ( ) : boolean Gets C locale setting.
getDomain ( ) : string
getEncoding ( ) : string
getFallbackLocale ( ) : string
getHandler ( ) : mixed Returns the handler name
getKeywordsList ( ) : mixed Gets the Poedit keywords list.
getLocale ( ) : string
getProject ( ) : string
getRelativePath ( )
getSessionIdentifier ( ) : string
getSourcePaths ( ) : array
getSourcesFromDomain ( $domain ) : array Return all routes for a single domain
getSupportedLocales ( ) : array
getSyncLaravel ( ) : mixed Gets the Sync with laravel locale.
getTranslationsPath ( ) : string
getTranslator ( ) : string
isSyncLaravel ( ) : boolean
setAdapter ( string $adapter )
setCategories ( array $categories ) : self Sets categories
setCustomLocale ( $customLocale ) : self Sets if will use C locale structure.
setDomain ( string $domain )
setEncoding ( string $encoding )
setFallbackLocale ( string $fallbackLocale )
setHandler ( $handler ) Sets the handler type. Also check for valid handler name
setKeywordsList ( mixed $keywordsList ) : self Sets the Poedit keywords list.
setLocale ( string $locale )
setProject ( string $project )
setRelativePath ( $path )
setSessionIdentifier ( string $sessionIdentifier )
setSourcePaths ( array $sourcePaths )
setSupportedLocales ( array $supportedLocales )
setSyncLaravel ( boolean $syncLaravel )
setTranslationsPath ( string $translationsPath )
setTranslator ( string $translator )

Method Details

__construct() public method

public __construct ( )

getAdapter() public method

Gets the adapter class.
public getAdapter ( ) : string
return string

getAllDomains() public method

Return an array with all domain names
public getAllDomains ( ) : array
return array

getCategories() public method

Gets categories
public getCategories ( ) : array
return array

getCustomLocale() public method

Gets C locale setting.
public getCustomLocale ( ) : boolean
return boolean

getDomain() public method

public getDomain ( ) : string
return string

getEncoding() public method

public getEncoding ( ) : string
return string

getFallbackLocale() public method

public getFallbackLocale ( ) : string
return string

getHandler() public method

Returns the handler name
public getHandler ( ) : mixed
return mixed

getKeywordsList() public method

Gets the Poedit keywords list.
public getKeywordsList ( ) : mixed
return mixed

getLocale() public method

public getLocale ( ) : string
return string

getProject() public method

public getProject ( ) : string
return string

getRelativePath() public method

public getRelativePath ( )

getSessionIdentifier() public method

public getSessionIdentifier ( ) : string
return string

getSourcePaths() public method

public getSourcePaths ( ) : array
return array

getSourcesFromDomain() public method

Return all routes for a single domain
public getSourcesFromDomain ( $domain ) : array
$domain
return array

getSupportedLocales() public method

public getSupportedLocales ( ) : array
return array

getSyncLaravel() public method

Gets the Sync with laravel locale.
public getSyncLaravel ( ) : mixed
return mixed

getTranslationsPath() public method

public getTranslationsPath ( ) : string
return string

getTranslator() public method

public getTranslator ( ) : string
return string

isSyncLaravel() public method

public isSyncLaravel ( ) : boolean
return boolean

setAdapter() public method

public setAdapter ( string $adapter )
$adapter string

setCategories() public method

Sets categories
public setCategories ( array $categories ) : self
$categories array
return self

setCustomLocale() public method

Sets if will use C locale structure.
public setCustomLocale ( $customLocale ) : self
return self

setDomain() public method

public setDomain ( string $domain )
$domain string

setEncoding() public method

public setEncoding ( string $encoding )
$encoding string

setFallbackLocale() public method

public setFallbackLocale ( string $fallbackLocale )
$fallbackLocale string

setHandler() public method

Sets the handler type. Also check for valid handler name
public setHandler ( $handler )
$handler

setKeywordsList() public method

Sets the Poedit keywords list.
public setKeywordsList ( mixed $keywordsList ) : self
$keywordsList mixed the keywords list
return self

setLocale() public method

public setLocale ( string $locale )
$locale string

setProject() public method

public setProject ( string $project )
$project string

setRelativePath() public method

public setRelativePath ( $path )

setSessionIdentifier() public method

public setSessionIdentifier ( string $sessionIdentifier )
$sessionIdentifier string

setSourcePaths() public method

public setSourcePaths ( array $sourcePaths )
$sourcePaths array

setSupportedLocales() public method

public setSupportedLocales ( array $supportedLocales )
$supportedLocales array

setSyncLaravel() public method

public setSyncLaravel ( boolean $syncLaravel )
$syncLaravel boolean

setTranslationsPath() public method

public setTranslationsPath ( string $translationsPath )
$translationsPath string

setTranslator() public method

public setTranslator ( string $translator )
$translator string

Property Details

$adapter protected property

The adapter class used to sync with laravel locale
protected string $adapter
return string

$categories protected property

Locale categories
protected $categories

$customLocale protected property

Custom locale name Used when needed locales are unavalilable
protected $customLocale

$domain protected property

Gettext domain
protected string $domain
return string

$encoding protected property

Charset encoding for files
protected string $encoding
return string

$fallbackLocale protected property

Fallback locale
protected string $fallbackLocale
return string

$handler protected property

Core translation handler
protected $handler

$keywordsList protected property

Poedit keywords list
protected $keywordsList

$locale protected property

Full ISO Locale (en_EN)
protected string $locale
return string

$project protected property

Project identifier
protected string $project
return string

$relativePath protected property

Default relative path
protected $relativePath

$sessionIdentifier protected property

Session identifier
protected string $sessionIdentifier
return string

$sourcePaths protected property

Source paths
protected array $sourcePaths
return array

$supportedLocales protected property

Supported locales
protected array $supportedLocales
return array

$syncLaravel protected property

Sync with laravel locale
protected $syncLaravel

$translationsPath protected property

Path to translation files
protected string $translationsPath
return string

$translator protected property

Translator contact data
protected string $translator
return string