You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
67 lines
1.4 KiB
67 lines
1.4 KiB
<?php
|
|
|
|
namespace Auxilium\DatabaseInteractions\Deegraph\Nodes;
|
|
|
|
|
|
use App\Wrappers\DeegraphNode;
|
|
|
|
class User extends DeegraphNode
|
|
{
|
|
public function __construct(string $objectUuid)
|
|
{
|
|
parent::__construct($objectUuid);
|
|
}
|
|
|
|
/**
|
|
* Retrieves the system node user instance.
|
|
*
|
|
* @return User Returns a User instance representing the system node.
|
|
*/
|
|
public static function get_system_node(): User
|
|
{
|
|
return new User(INSTANCE_CREDENTIAL_DDS_LOGIN_NODE);
|
|
}
|
|
|
|
public function getDisplayName(): mixed
|
|
{
|
|
if($this->getProperty("display_name") != null)
|
|
{
|
|
return $this->getProperty("display_name");
|
|
}
|
|
if($this->getProperty("name") != null)
|
|
{
|
|
return $this->getProperty("name");
|
|
}
|
|
return null;
|
|
}
|
|
|
|
public function getFullName(): mixed
|
|
{
|
|
if($this->getProperty("name") != null)
|
|
{
|
|
return $this->getProperty("name");
|
|
}
|
|
return null;
|
|
}
|
|
|
|
public function getContactEmail(): mixed
|
|
{
|
|
if($this->getProperty("contact_email") != null)
|
|
{
|
|
return $this->getProperty("contact_email");
|
|
}
|
|
return null;
|
|
}
|
|
|
|
public function __toString(): string
|
|
{
|
|
if($this->getProperty("name") == null)
|
|
{
|
|
return "";
|
|
}
|
|
else
|
|
{
|
|
return strval($this->getProperty("name"));
|
|
}
|
|
}
|
|
}
|
|
|