52 lines
1.3 KiB
PHP
52 lines
1.3 KiB
PHP
<?php
|
|
namespace Mocha\Oms;
|
|
|
|
use Mocha\Core\InstanceKey;
|
|
use Mocha\Core\InstanceReference;
|
|
|
|
use Mocha\Core\KnownClassGuids;
|
|
use Mocha\Core\KnownInstanceGuids;
|
|
use Mocha\Core\KnownAttributeGuids;
|
|
|
|
abstract class Oms
|
|
{
|
|
/**
|
|
* Gets the instance with the specified global identifier.
|
|
*/
|
|
public function getInstanceByGlobalIdentifier(string $inst) : ?InstanceReference
|
|
{
|
|
return null;
|
|
}
|
|
|
|
public function getRelatedInstances(InstanceReference $sourceInstance, InstanceReference $relationshipInstance, \DateTime $effectiveDate = null) : ?array
|
|
{
|
|
return null;
|
|
}
|
|
|
|
/**
|
|
* Gets the instance representing the default tenant.
|
|
*/
|
|
public function getTenantInstance() : ?InstanceReference
|
|
{
|
|
return $this->getInstanceByGlobalIdentifier(KnownInstanceGuids::DefaultTenant);
|
|
}
|
|
|
|
/**
|
|
* Gets the value of the given attribute on the specified instance.
|
|
*/
|
|
public function getAttributeValue($sourceInstance, $attributeInstance, $defaultValue = null, $effectiveDate = null) : ?string
|
|
{
|
|
return null;
|
|
}
|
|
public function getInstanceText($inst)
|
|
{
|
|
return $this->getAttributeValue($inst, $this->getInstanceByGlobalIdentifier(KnownAttributeGuids::Name));
|
|
}
|
|
|
|
public function setTenant($tenantName)
|
|
{
|
|
$this->_tenantName = $tenantName;
|
|
}
|
|
}
|
|
?>
|