本文整理汇总了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);
}