当前位置: 首页>>代码示例>>PHP>>正文


PHP SimpleSAML_XHTML_Template::includeInlineTranslation方法代码示例

本文整理汇总了PHP中SimpleSAML_XHTML_Template::includeInlineTranslation方法的典型用法代码示例。如果您正苦于以下问题:PHP SimpleSAML_XHTML_Template::includeInlineTranslation方法的具体用法?PHP SimpleSAML_XHTML_Template::includeInlineTranslation怎么用?PHP SimpleSAML_XHTML_Template::includeInlineTranslation使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在SimpleSAML_XHTML_Template的用法示例。


在下文中一共展示了SimpleSAML_XHTML_Template::includeInlineTranslation方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: includeTranslation

 /**
  * @param string $dictionaryName
  * @param string $translationName
  * @param array $translations
  */
 private function includeTranslation($dictionaryName, $translationName, array $translations)
 {
     if (!isset($translations[$this->languageCode])) {
         return;
     }
     $translation = $translations[$this->languageCode];
     $this->template->includeInlineTranslation($this->createTagForTranslation($dictionaryName, $translationName), $translation);
 }
开发者ID:baszoetekouw,项目名称:janus,代码行数:13,代码来源:CustomDictionaryLoader.php

示例2: array

    }
    $liveClients = array();
    foreach ($user['clients'] as $id) {
        $client = $clientStore->getClient($id);
        if (!is_null($client)) {
            array_push($clients, $client);
            array_push($liveClients, $client['id']);
        }
    }
    if (count($liveAuthorizationCodes) != count($user['authorizationCodes']) || count($liveRefreshTokens) != count($user['refreshTokens']) || count($liveAccessTokens) != count($user['accessTokens']) || count($liveClients) != count($user['clients'])) {
        $user['authorizationCodes'] = $liveAuthorizationCodes;
        $user['refreshTokens'] = $liveRefreshTokens;
        $user['accessTokens'] = $liveAccessTokens;
        $user['clients'] = $liveClients;
        $userStore->updateUser($user);
    }
}
$t = new SimpleSAML_XHTML_Template($globalConfig, 'oauth2server:manage/status.php');
$t->data['authorizationCodes'] = $authorizationCodes;
$t->data['refreshTokens'] = $refreshTokens;
$t->data['accessTokens'] = $accessTokens;
if ($config->getValue('enable_client_registration', false)) {
    $t->data['clients'] = $clients;
    foreach ($clients as $client) {
        $t->includeInlineTranslation('{oauth2server:oauth2server:client_description_' . $client['id'] . '}', $client['description']);
    }
}
$t->data['statusForm'] = SimpleSAML_Module::getModuleURL('oauth2server/manage/status.php');
$t->data['tokenForm'] = SimpleSAML_Module::getModuleURL('oauth2server/manage/token.php');
$t->data['clientForm'] = SimpleSAML_Module::getModuleURL('oauth2server/manage/client.php');
$t->show();
开发者ID:shamus13,项目名称:simplesamlphp-module-oauth2server,代码行数:31,代码来源:status.php

示例3: array

            $token = $tokenStore->getRefreshToken($_REQUEST['tokenId']);
            if (is_array($token) && isset($_POST['revoke'])) {
                $tokenStore->removeRefreshToken($_REQUEST['tokenId']);
                SimpleSAML\Utils\HTTP::redirectTrustedURL(SimpleSAML_Module::getModuleURL('oauth2server/manage/status.php'));
            }
        } else {
            if (array_search($_REQUEST['tokenId'], $user['accessTokens']) !== false) {
                $token = $tokenStore->getAccessToken($_REQUEST['tokenId']);
                if (is_array($token) && isset($_POST['revoke'])) {
                    $tokenStore->removeAccessToken($_REQUEST['tokenId']);
                    SimpleSAML\Utils\HTTP::redirectTrustedURL(SimpleSAML_Module::getModuleURL('oauth2server/manage/status.php'));
                }
            }
        }
    }
}
$globalConfig = SimpleSAML_Configuration::getInstance();
$t = new SimpleSAML_XHTML_Template($globalConfig, 'oauth2server:manage/token.php');
foreach ($config->getValue('scopes', array()) as $scope => $translations) {
    $t->includeInlineTranslation('{oauth2server:oauth2server:' . $scope . '}', $translations);
}
if (isset($token)) {
    $clientStore = new sspmod_oauth2server_OAuth2_ClientStore($config);
    $client = $clientStore->getClient($token['clientId']);
    if (!is_null($client)) {
        $t->data['token'] = $token;
        $t->includeInlineTranslation('{oauth2server:oauth2server:client_description_text}', $client['description']);
    }
}
$t->data['form'] = SimpleSAML_Module::getModuleURL('oauth2server/manage/token.php');
$t->show();
开发者ID:shamus13,项目名称:simplesamlphp-module-oauth2server,代码行数:31,代码来源:token.php

示例4: array

    }
} else {
    if (array_key_exists('deny', $_REQUEST)) {
        $response = \sspmod_oauth2server_Utility_Uri::buildErrorResponse('access_denied', 'request denied by resource owner', 'CONSENT_NOT_GRANTED', array());
        $response['error_uri'] = SimpleSAML\Utils\HTTP::addURLParameters(SimpleSAML_Module::getModuleURL('oauth2server/authorization/error.php'), $response);
        if (array_key_exists('state', $state)) {
            $response['state'] = $state['state'];
        }
        unset($response['error_code_internal']);
        unset($response['error_parameters_internal']);
        sspmod_oauth2server_Utility_Uri::redirectUri(sspmod_oauth2server_Utility_Uri::addQueryParametersToUrl($state['returnUri'], $response));
    }
}
$t = new SimpleSAML_XHTML_Template($globalConfig, 'oauth2server:authorization/consent.php');
foreach ($config->getValue('scopes', array()) as $scope => $translations) {
    $t->includeInlineTranslation('{oauth2server:oauth2server:' . $scope . '}', $translations);
}
$t->includeInlineTranslation('{oauth2server:oauth2server:client_description}', array_key_exists('description', $client) ? $client['description'] : array('' => ''));
$t->data['clientId'] = $state['clientId'];
$t->data['stateId'] = $_REQUEST['stateId'];
$t->data['scopes'] = array();
$scopes = isset($client['scope']) ? $client['scope'] : array();
foreach ($state['requestedScopes'] as $scope) {
    $t->data['scopes'][$scope] = isset($scopes[$scope]) && $scopes[$scope];
}
$t->data['form'] = SimpleSAML_Module::getModuleURL('oauth2server/authorization/consent.php');
foreach ($tokenTTLs as $ttl => $translations) {
    $t->includeInlineTranslation('{oauth2server:oauth2server:ttl_' . $ttl . '}', $translations);
}
$t->data['ttlChoices'] = array_keys($tokenTTLs);
$t->data['ttlDefault'] = $t->data['ttlChoices'][0];
开发者ID:shamus13,项目名称:simplesamlphp-module-oauth2server,代码行数:31,代码来源:consent.php


注:本文中的SimpleSAML_XHTML_Template::includeInlineTranslation方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。