Replace deprecated getObject with getObjectNode
This commit is contained in:
@@ -157,7 +157,7 @@ class APIClientFactory {
|
||||
if ($this->reader->hasProperty($api, 'oauth2:hasAuthorizationServer')) {
|
||||
// We have an authorization server for this endpoint/API
|
||||
$authServerCoid = $this->reader->getFirstValueIRI($api, 'oauth2:hasAuthorizationServer');
|
||||
$authServerObject = $this->objectRetriever->getObject($authServerCoid);
|
||||
$authServerObject = $this->objectRetriever->getObjectNode($authServerCoid);
|
||||
if (!isset($authServerObject))
|
||||
throw new InvalidObjectConfigurationException("Authorization server object <"
|
||||
. (string)$authServerCoid . "> not available.");
|
||||
@@ -220,7 +220,7 @@ class APIClientFactory {
|
||||
public function __construct(ObjectRetriever $objectRetriever, IRI $namespaceCoid = null) {
|
||||
$this->objectRetriever = $objectRetriever;
|
||||
$this->namespace = isset($namespaceCoid)
|
||||
? $objectRetriever->getObject($namespaceCoid)
|
||||
? $objectRetriever->getObjectNode($namespaceCoid)
|
||||
: $objectRetriever->getAuthenticatingNamespaceObject();
|
||||
|
||||
$this->reader = new NodeReader([
|
||||
@@ -242,7 +242,7 @@ class APIClientFactory {
|
||||
public function getClientWithCOID(IRI $apiCoid, bool $specificClient = false) {
|
||||
$idString = (string)$apiCoid.(string)$specificClient;
|
||||
if (!isset($this->apiClients[$idString])) {
|
||||
$object = $this->objectRetriever->getObject($apiCoid);
|
||||
$object = $this->objectRetriever->getObjectNode($apiCoid);
|
||||
if (!isset($object))
|
||||
throw new CoreAPIException("Could not retrieve API <".(string)$apiCoid.">.");
|
||||
$this->apiClients[$idString] = $this->createClient($object, $specificClient);
|
||||
|
||||
Reference in New Issue
Block a user