@@ 108-110 (lines=3) @@ | ||
105 | /* If using the basePath option, strip the basePath. Otherwise, the path becomes the basename of the URI. */ |
|
106 | if (isset($this->options[self::KEY_BASE_PATH])) { |
|
107 | $basePathPosition = strpos($path, $this->options[self::KEY_BASE_PATH]); |
|
108 | if (false !== $basePathPosition) { |
|
109 | $path = substr($path, $basePathPosition + strlen($this->options[self::KEY_BASE_PATH])); |
|
110 | } |
|
111 | ||
112 | return trim(dirname($path), "/") . '/' . basename($path, '.php'); /* For example, x/y/z/FooService */ |
|
113 | } else { |
@@ 163-165 (lines=3) @@ | ||
160 | { |
|
161 | if (isset($options[self::KEY_BASE_PATH])) { |
|
162 | $pos = strpos($path, $options[self::KEY_BASE_PATH]); |
|
163 | if (false !== $pos) { |
|
164 | $path = substr($path, $pos + strlen($options[self::KEY_BASE_PATH])); |
|
165 | } |
|
166 | } |
|
167 | // ensure the path has a leading slash |
|
168 | if (empty($path) || $path[0] !== '/') { |