SimpleSAML\Locale\Translate::__construct PHP Метод

__construct() публичный Метод

Constructor
public __construct ( SimpleSAML_Configuration $configuration, string | null $defaultDictionary = null )
$configuration SimpleSAML_Configuration Configuration object
$defaultDictionary string | null The default dictionary where tags will come from.
    public function __construct(\SimpleSAML_Configuration $configuration, $defaultDictionary = null)
    {
        $this->configuration = $configuration;
        $this->language = new Language($configuration);
        if ($defaultDictionary !== null && substr($defaultDictionary, -4) === '.php') {
            // TODO: drop this entire if clause for 2.0
            // for backwards compatibility - print warning
            $backtrace = debug_backtrace();
            $where = $backtrace[0]['file'] . ':' . $backtrace[0]['line'];
            \SimpleSAML\Logger::warning('Deprecated use of new SimpleSAML\\Locale\\Translate(...) at ' . $where . '. The last parameter is now a dictionary name, which should not end in ".php".');
            $this->defaultDictionary = substr($defaultDictionary, 0, -4);
        } else {
            $this->defaultDictionary = $defaultDictionary;
        }
    }