public static function getFirstPathElement($trailingslash = true) { return \SimpleSAML\Utils\HTTP::getFirstPathElement($trailingslash); }
public function getBaseURL() { if (preg_match('/^\\*(.*)$/', $this->getValue('baseurlpath', ''), $matches)) { return SimpleSAML_Utilities::getFirstPathElement(false) . $matches[1]; } return $this->getValue('baseurlpath', ''); }