EntityInterface

namespace

bhenk\msdata\abc

predicates

Abstract | Interface

implements

Stringable

known implementations

Entity | Join | NodeDo | PersonDo | UserDo

Definition of a basic data object


Methods

EntityInterface::fromArray

predicates

public | static | abstract

Create a new Entity from an array of properties

The given array should have the same order as the one gotten from EntityInterface::toArray.

public static abstract function fromArray(
      Parameter #0 [ <required> array $arr ]
 ): Entity
param array $arr - property array
return Entity - newly created Entity with the given properties

EntityInterface::getID

predicates

public | abstract

Get the ID of this Entity or null if it has no ID

public abstract function getID(): ?int
return ?int - ID of this Entity or null

EntityInterface::toArray

predicates

public | abstract

Express the properties of this Entity in an array

The returned array should be in such order that it can be fet to the static method EntityInterface::fromArray.

public abstract function toArray(): array
return array - array with properties of this Entity

EntityInterface::clone

predicates

public | abstract

Create an Entity that equals this Entity

The newly created Entity gets the given ID or no ID if param $ID is null.

public abstract function clone(
      Parameter #0 [ <optional> ?int $ID = NULL ]
 ): Entity
param ?int $ID
return Entity

EntityInterface::equals

predicates

public | abstract

Test equals function

The given Entity equals this Entity if all properties, except ID, are equal.

public abstract function equals(
      Parameter #0 [ <required> bhenk\msdata\abc\Entity $other ]
 ): bool
param Entity $other - Entity to test
return bool - true if all properties are equal, false otherwise

EntityInterface::isSame

predicates

public | abstract

Test is same function

The given Entity is similar to this Entity if all properties, including ID, are equal.

public abstract function isSame(
      Parameter #0 [ <required> bhenk\msdata\abc\Entity $other ]
 ): bool
param Entity $other - Entity to test
return bool - true if all properties, including ID, are equal, false otherwise

EntityInterface::__toString

predicates

public | abstract

public abstract function __toString(): string
return string

Sat, 01 Jul 2023 13:02:23 +0000