public function withPrefix($prefix) { $copy = clone $this; $copy->prefix = '/' . trim($prefix, '/'); return $copy; }