}
// set up defaults and merge them with the given params
$mparams = array_merge( array(
+ 'name' => 'parsoid',
'url' => 'http://localhost:8000/',
'prefix' => 'localhost',
'domain' => 'localhost',
public function __construct( array $params ) {
// set up defaults and merge them with the given params
$mparams = array_merge( array(
+ 'name' => 'restbase',
'url' => 'http://localhost:7231/',
'domain' => 'localhost',
'timeout' => 100,
* - swiftAuthTTL : Swift authentication TTL (seconds)
*/
public function __construct( array $params ) {
- parent::__construct( $params );
+ // set up defaults and merge them with the given params
+ $mparams = array_merge( array(
+ 'name' => 'swift'
+ ), $params );
+ parent::__construct( $mparams );
}
/**
$this->params = $params;
}
+ /**
+ * Return the name of this service, in a form suitable for error
+ * reporting or debugging.
+ *
+ * @return string The name of the service behind this VRS object.
+ */
+ public function getName() {
+ return isset( $this->params['name'] ) ? $this->params['name'] :
+ get_class( $this );
+ }
+
/**
* Prepare virtual HTTP(S) requests (for this service) for execution
*