PHP 클래스 Noherczeg\Breadcrumb\Translator

The sole job of this class is to properly translate (or not) the given value according to the configurations.
파일 보기 프로젝트 열기: noherczeg/breadcrumb 1 사용 예제들

공개 메소드들

메소드 설명
__construct ( String $config = null ) Constructor
dump ( ) : array dump: Dumps the contents of the Dictionary.
loadDictionary ( String $lang = null ) : array loadDictionary: loads a language array from the Language folder.
loadFile ( String $file_to_load = null ) : array loadFile: yeah, well, separated due to testing purposes :(
translate ( String $key ) : String translate: Fetches a value from the Ditionary with an index provided.

비공개 메소드들

메소드 설명
initDictionary ( $config )

메소드 상세

__construct() 공개 메소드

Constructor
public __construct ( String $config = null )
$config String The code(file name in the Languages folder), or an array of key-value pairs of the language to use for translations

dump() 공개 메소드

dump: Dumps the contents of the Dictionary.
public dump ( ) : array
리턴 array

loadDictionary() 공개 메소드

loadDictionary: loads a language array from the Language folder.
public loadDictionary ( String $lang = null ) : array
$lang String Selected language's code e.g. 'en'
리턴 array

loadFile() 공개 메소드

loadFile: yeah, well, separated due to testing purposes :(
public loadFile ( String $file_to_load = null ) : array
$file_to_load String Language file's name
리턴 array

translate() 공개 메소드

translate: Fetches a value from the Ditionary with an index provided.
public translate ( String $key ) : String
$key String Parameter which we want to translate
리턴 String