_convertServiceParam( TPropertyValue::ensureString($serviceParam) ), preg_replace('#^/' . $serviceID . '#', '', $url) ), '/' ) . '/'; } public function parseUrl() { $params = parent::parseUrl(); if ($this->MatchingPattern) { $serviceID = $this->MatchingPattern->ServiceID; if (isset($params[$serviceID])) { $params[$serviceID] = $this->_parseServiceParam( TPropertyValue::ensureString($params[$serviceID]) ); } } return $params; } /** * Convert service param from camelCase to hyphenated-form. **/ private function _convertServiceParam(string $param = '') { return implode( '-', array_map('mb_strtolower', array_filter(preg_split('/(?=[A-Z])/', $param))) ); } /** * Convert service param from hyphenated-form to camelCase. **/ private function _parseServiceParam(string $param = '') { return implode( '', array_map('ucfirst', explode('-', $param)) ); } } ?>