Noherczeg\Breadcrumb\Translator::__construct PHP Метод

__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
    public function __construct($config = null)
    {
        // load the configs
        $this->config = new \Noherczeg\Breadcrumb\Config();
        // set up folder path
        $this->language_folder = __DIR__ . DIRECTORY_SEPARATOR . 'Languages' . DIRECTORY_SEPARATOR;
        // try to load a dictionary
        try {
            $this->initDictionary($config);
        } catch (InvalidArgumentException $a) {
            echo 'Translator Exception: ' . $a->getMessage();
        } catch (FileNotFoundException $f) {
            echo 'Translator Exception: ' . $f->getMessage();
        }
    }