PHP Class LocaleModel, vanilla

Author: Chris Pollett
Inheritance: extends Model
Show file Open project: vanilla/vanilla Class Usage Examples

Protected Properties

Property Type Description
$_AvailableLocalePacks Locales in the system.

Public Methods

Method Description
availableLocalePacks ( ) : array | null
availableLocales ( ) : array
copyDefinitions ( $SourcePath, $DestPath ) : mixed
enabledLocalePacks ( boolean $GetInfo = false ) : array
generateChanges ( $Path, $BasePath, null $DestPath = null ) : null | string
loadDefinitions ( $Path, null $Skip = null ) : array
testLocale ( string $LocaleKey ) Temporarily enable a locale pack without installing it/
writeDefinitions ( resource $fp, array $Definitions ) Write a locale's definitions to a file.

Protected Methods

Method Description
calculateLocaleInfo ( &$info )
getFileHeader ( )

Method Details

availableLocalePacks() public method

public availableLocalePacks ( ) : array | null
return array | null

availableLocales() public method

public availableLocales ( ) : array
return array

calculateLocaleInfo() protected method

protected calculateLocaleInfo ( &$info )
$info

copyDefinitions() public method

public copyDefinitions ( $SourcePath, $DestPath ) : mixed
$SourcePath
$DestPath
return mixed

enabledLocalePacks() public method

public enabledLocalePacks ( boolean $GetInfo = false ) : array
$GetInfo boolean
return array

generateChanges() public method

public generateChanges ( $Path, $BasePath, null $DestPath = null ) : null | string
$Path
$BasePath
$DestPath null
return null | string

getFileHeader() protected method

protected getFileHeader ( )

loadDefinitions() public method

public loadDefinitions ( $Path, null $Skip = null ) : array
$Path
$Skip null
return array

testLocale() public method

Temporarily enable a locale pack without installing it/
public testLocale ( string $LocaleKey )
$LocaleKey string The key of the folder.

writeDefinitions() public static method

Write a locale's definitions to a file.
public static writeDefinitions ( resource $fp, array $Definitions )
$fp resource The file to write to.
$Definitions array The definitions to write.

Property Details

$_AvailableLocalePacks protected property

Locales in the system.
protected $_AvailableLocalePacks