trait XmlRpcTrait in xmlrpc 8
XmlRpcTrait provides the getEndpoint() method used in tests and examples.
Hierarchy
- trait \Drupal\xmlrpc\XmlRpcTrait
4 files declare their use of XmlRpcTrait
- XmlRpcExampleClientForm.php in xmlrpc_example/
src/ Form/ XmlRpcExampleClientForm.php - XmlRpcExampleController.php in xmlrpc_example/
src/ Controller/ XmlRpcExampleController.php - XmlRpcExampleTest.php in xmlrpc_example/
src/ Tests/ XmlRpcExampleTest.php - XmlRpcMessagesTest.php in src/
Tests/ XmlRpcMessagesTest.php
File
- src/
XmlRpcTrait.php, line 10
Namespace
Drupal\xmlrpcView source
trait XmlRpcTrait {
/**
* The XML-RPC server endpoint.
*
* @var string
*/
protected $endPoint;
/**
* Returns the URI of the server XML-RPC endpoint.
*
* @return string
* The server endpoint URI.
*/
public function getEndpoint() {
if (!isset($this->endPoint)) {
$uri = Url::fromUri($GLOBALS['base_url'] . '/xmlrpc');
$this->endPoint = $uri
->toUriString();
}
return $this->endPoint;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
XmlRpcTrait:: |
protected | property | The XML-RPC server endpoint. | |
XmlRpcTrait:: |
public | function | Returns the URI of the server XML-RPC endpoint. |