PHP Класс SimpleSAML_XHTML_Template, simplesamlphp

Автор: Andreas Åkre Solberg, UNINETT AS. ([email protected])
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
$data array The data associated with this template, accessible within the template itself.

Открытые методы

Метод Описание
__construct ( SimpleSAML_Configuration $configuration, string $template, string | null $defaultDictionary = null ) Constructor
getAttributeTranslation ( $name ) : string
getLanguage ( ) : string
getLanguageCookie ( ) : null | string
getTag ( $tag ) : array
getTranslation ( $translations ) Temporary wrapper for \SimpleSAML\Locale\Translate::getPreferredTranslation().
getTranslator ( ) : Translate Return the internal translator object used by this template.
includeInlineTranslation ( $tag, $translation ) Wraps Translate->includeInlineTranslation()
includeLanguageFile ( $file, null $otherConfig = null )
lang_merge ( array $def, array $lang ) : array Merge two translation arrays.
noop ( $tag ) Behave like Language->noop to mark a tag for translation but actually do it later.
setLanguage ( $language, boolean $setLanguageCookie = true )
setLanguageCookie ( $language )
show ( ) Show the template to the user.
t ( $tag, $replacements = [], $fallbackdefault = true, $oldreplacements = [], $striptags = false ) Wrap Language->t to translate tag into the current language, with a fallback to english.

Приватные методы

Метод Описание
findModuleAndTemplateName ( string $template ) : array Find module the template is in, if any
findModuleTemplateDirs ( ) * Which enabled modules have templates?
findTemplatePath ( string $template, $throw_exception = true ) : string Find template path.
findThemeTemplateDirs ( ) * Add overriding templates in configured theme
generateLanguageBar ( ) : array Generate an array for its use in the language bar, indexed by the ISO 639-2 codes of the languages available, containing their localized names and the URL that should be used in order to change to that language.
getLanguageList ( ) Wraps Language->getLanguageList
includeAtTemplateBase ( $file ) Includes a file relative to the template base directory.
isLanguageRTL ( ) Wrap Language->isLanguageRTL
normalizeTemplateName ( string $templateName ) : string Normalize the name of the template to one of the possible alternatives.
setupTwig ( ) Setup twig.
setupTwigTemplatepaths ( ) : Twig_Loader_Filesystem | false Set up the places where twig can look for templates.
twigDefaultContext ( ) Set some default context

Описание методов

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

Constructor
public __construct ( SimpleSAML_Configuration $configuration, string $template, string | null $defaultDictionary = null )
$configuration SimpleSAML_Configuration Configuration object
$template string Which template file to load
$defaultDictionary string | null The default dictionary where tags will come from.

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

Устаревший: This method will be removed in SSP 2.0. Please use \SimpleSAML\Locale\Language::getLanguage() instead.
public getAttributeTranslation ( $name ) : string
$name
Результат string

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

Устаревший: This method will be removed in SSP 2.0. Please use \SimpleSAML\Locale\Language::getLanguage() instead.
public getLanguage ( ) : string
Результат string

getLanguageCookie() публичный статический Метод

Устаревший: This method will be removed in SSP 2.0. Please use \SimpleSAML\Locale\Language::getLanguageCookie() instead.
public static getLanguageCookie ( ) : null | string
Результат null | string

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

Устаревший: This method will be removed in SSP 2.0. Please use \SimpleSAML\Locale\Translate::getTag() instead.
public getTag ( $tag ) : array
$tag
Результат array

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

Temporary wrapper for \SimpleSAML\Locale\Translate::getPreferredTranslation().
Устаревший: This method will be removed in SSP 2.0. Please use \SimpleSAML\Locale\Translate::getPreferredTranslation() instead.
public getTranslation ( $translations )

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

Return the internal translator object used by this template.
public getTranslator ( ) : Translate
Результат SimpleSAML\Locale\Translate The translator that will be used with this template.

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

Wraps Translate->includeInlineTranslation()
См. также: SimpleSAML\Locale\Translate::includeInlineTranslation()
Устаревший: This method will be removed in SSP 2.0. Please use \SimpleSAML\Locale\Translate::includeInlineTranslation() instead.
public includeInlineTranslation ( $tag, $translation )

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

Устаревший: This method will be removed in SSP 2.0. Please use \SimpleSAML\Locale\Translate::includeLanguageFile() instead.
public includeLanguageFile ( $file, null $otherConfig = null )
$file
$otherConfig null

lang_merge() публичный статический Метод

Merge two translation arrays.
Устаревший: This method will be removed in SimpleSAMLphp 2.0. Please use array_merge_recursive() instead.
public static lang_merge ( array $def, array $lang ) : array
$def array The array holding string definitions.
$lang array The array holding translations for every string.
Результат array The recursive merge of both arrays.

noop() публичный статический Метод

Behave like Language->noop to mark a tag for translation but actually do it later.
См. также: SimpleSAML\Locale\Translate::noop()
Устаревший: This method will be removed in SSP 2.0. Please use \SimpleSAML\Locale\Translate::noop() instead.
public static noop ( $tag )

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

Устаревший: This method will be removed in SSP 2.0. Please use \SimpleSAML\Locale\Language::setLanguage() instead.
public setLanguage ( $language, boolean $setLanguageCookie = true )
$language
$setLanguageCookie boolean

setLanguageCookie() публичный статический Метод

Устаревший: This method will be removed in SSP 2.0. Please use \SimpleSAML\Locale\Language::setLanguageCookie() instead.
public static setLanguageCookie ( $language )
$language

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

Show the template to the user.
public show ( )

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

Wrap Language->t to translate tag into the current language, with a fallback to english.
См. также: SimpleSAML\Locale\Translate::t()
Устаревший: This method will be removed in SSP 2.0. Please use \SimpleSAML\Locale\Translate::t() instead.
public t ( $tag, $replacements = [], $fallbackdefault = true, $oldreplacements = [], $striptags = false )

Описание свойств

$data публичное свойство

The data associated with this template, accessible within the template itself.
public array $data
Результат array