本文整理匯總了PHP中SimpleSAML_Configuration::getBasePath方法的典型用法代碼示例。如果您正苦於以下問題:PHP SimpleSAML_Configuration::getBasePath方法的具體用法?PHP SimpleSAML_Configuration::getBasePath怎麽用?PHP SimpleSAML_Configuration::getBasePath使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類SimpleSAML_Configuration
的用法示例。
在下文中一共展示了SimpleSAML_Configuration::getBasePath方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: __construct
/**
* Constructor
*
* @param SimpleSAML_Configuration $configuration Configuration object
* @param string $template Which template file to load
* @param string|null $defaultDictionary The default dictionary where tags will come from.
*/
public function __construct(\SimpleSAML_Configuration $configuration, $template, $defaultDictionary = null)
{
$this->configuration = $configuration;
$this->template = $template;
// TODO: do not remove the slash from the beginning, change the templates instead!
$this->data['baseurlpath'] = ltrim($this->configuration->getBasePath(), '/');
$result = $this->findModuleAndTemplateName($template);
$this->module = $result[0];
$this->translator = new SimpleSAML\Locale\Translate($configuration, $defaultDictionary);
$this->localization = new \SimpleSAML\Locale\Localization($configuration);
$this->twig = $this->setupTwig();
}
示例2: setCookie
/**
* Save cookie with the given name and value.
*
* This function will save a cookie with the given name and value for the current discovery
* service type.
*
* @param string $name The name of the cookie.
* @param string $value The value of the cookie.
*/
protected function setCookie($name, $value)
{
$prefixedName = 'idpdisco_' . $this->instance . '_' . $name;
$params = array('lifetime' => 60 * 60 * 24 * 90, 'path' => $this->config->getBasePath(), 'httponly' => false);
\SimpleSAML\Utils\HTTP::setCookie($prefixedName, $value, $params, false);
}