DB lang data parser

 Methods

Sets up the file to be parsed and variables

__construct(string $identifier, array $languages, array $vars) 

Parameters

$identifier

string

Lang identifier name

$languages

array

Languages to scan for the lang file

$vars

array

Variables to parse in the data retrieved

Gets the default group name.

group() : string

Returns

string

Loads the language file(s).

load(bool $overwrite) : array

Parameters

$overwrite

bool

Whether to overwrite existing values

Exceptions

\Database_Exception

Returns

arraythe language array

Formats the output and saved it to the database.

save(string $identifier, \Fuel\Core\$contents $contents) : bool

Parameters

$identifier

string

filename

$contents

\Fuel\Core\$contents

language array to save

Returns

boolDB result

Parses a string using all of the previously set variables.

parse_vars(string $string) : string

Allows you to use something like %APPPATH% in non-PHP files.

Parameters

$string

string

String to parse

Returns

string

Replaces FuelPHP's path constants to their string counterparts.

prep_vars(array $array) : array

Parameters

$array

array

array to be prepped

Returns

arrayprepped array

 Properties

 

$database

$database 

 

$ext

$ext 

 

$identifier

$identifier 

 

$languages

$languages 

 

$table

$table 

 

$vars

$vars