PHP Class SimpleSAML_XHTML_Template, simplesamlphp

Author: Andreas Åkre Solberg, UNINETT AS. ([email protected])
Exibir arquivo Open project: simplesamlphp/simplesamlphp Class Usage Examples

Public Properties

Property Type Description
$data array The data associated with this template, accessible within the template itself.

Public Methods

Method Description
__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.

Private Methods

Method Description
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

Method Details

__construct() public method

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() public method

Deprecation: This method will be removed in SSP 2.0. Please use \SimpleSAML\Locale\Language::getLanguage() instead.
public getAttributeTranslation ( $name ) : string
$name
return string

getLanguage() public method

Deprecation: This method will be removed in SSP 2.0. Please use \SimpleSAML\Locale\Language::getLanguage() instead.
public getLanguage ( ) : string
return string

getLanguageCookie() public static method

Deprecation: This method will be removed in SSP 2.0. Please use \SimpleSAML\Locale\Language::getLanguageCookie() instead.
public static getLanguageCookie ( ) : null | string
return null | string

getTag() public method

Deprecation: This method will be removed in SSP 2.0. Please use \SimpleSAML\Locale\Translate::getTag() instead.
public getTag ( $tag ) : array
$tag
return array

getTranslation() public method

Temporary wrapper for \SimpleSAML\Locale\Translate::getPreferredTranslation().
Deprecation: This method will be removed in SSP 2.0. Please use \SimpleSAML\Locale\Translate::getPreferredTranslation() instead.
public getTranslation ( $translations )

getTranslator() public method

Return the internal translator object used by this template.
public getTranslator ( ) : Translate
return SimpleSAML\Locale\Translate The translator that will be used with this template.

includeInlineTranslation() public method

Wraps Translate->includeInlineTranslation()
See also: SimpleSAML\Locale\Translate::includeInlineTranslation()
Deprecation: This method will be removed in SSP 2.0. Please use \SimpleSAML\Locale\Translate::includeInlineTranslation() instead.
public includeInlineTranslation ( $tag, $translation )

includeLanguageFile() public method

Deprecation: 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() public static method

Merge two translation arrays.
Deprecation: 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.
return array The recursive merge of both arrays.

noop() public static method

Behave like Language->noop to mark a tag for translation but actually do it later.
See also: SimpleSAML\Locale\Translate::noop()
Deprecation: This method will be removed in SSP 2.0. Please use \SimpleSAML\Locale\Translate::noop() instead.
public static noop ( $tag )

setLanguage() public method

Deprecation: 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() public static method

Deprecation: This method will be removed in SSP 2.0. Please use \SimpleSAML\Locale\Language::setLanguageCookie() instead.
public static setLanguageCookie ( $language )
$language

show() public method

Show the template to the user.
public show ( )

t() public method

Wrap Language->t to translate tag into the current language, with a fallback to english.
See also: SimpleSAML\Locale\Translate::t()
Deprecation: 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 )

Property Details

$data public_oe property

The data associated with this template, accessible within the template itself.
public array $data
return array