SimpleSAML_Utilities::getFirstPathElement PHP Method

getFirstPathElement() public static method

Deprecation: This method will be removed in SSP 2.0. Please use SimpleSAML\Utils\HTTP::getFirstPathElement() instead.
public static getFirstPathElement ( $trailingslash = true )
    public static function getFirstPathElement($trailingslash = true)
    {
        return \SimpleSAML\Utils\HTTP::getFirstPathElement($trailingslash);
    }

Usage Example

 public function getBaseURL()
 {
     if (preg_match('/^\\*(.*)$/', $this->getValue('baseurlpath', ''), $matches)) {
         return SimpleSAML_Utilities::getFirstPathElement(false) . $matches[1];
     }
     return $this->getValue('baseurlpath', '');
 }
All Usage Examples Of SimpleSAML_Utilities::getFirstPathElement