NodeDo

namespace

bhenk\msdata\node

predicates

Cloneable | Instantiable

implements

Stringable | EntityInterface

extends

Entity

hierarchy

NodeDo -> Entity


Constructor

NodeDo::__construct

predicates

public | constructor

public function __construct(
      Parameter #0 [ <optional> ?int $ID = NULL ]
      Parameter #1 [ <optional> ?int $parent_id = NULL ]
      Parameter #2 [ <optional> ?string $name = NULL ]
      Parameter #3 [ <optional> ?string $alias = NULL ]
      Parameter #4 [ <optional> ?string $nature = NULL ]
      Parameter #5 [ <optional> bool $public = true ]
      Parameter #6 [ <optional> float $estimate = 0.0 ]
 )
param ?int $ID
param ?int $parent_id
param ?string $name
param ?string $alias
param ?string $nature
param bool $public
param float $estimate

Methods

NodeDo::getParentId

predicates

public

public function getParentId(): ?int
return ?int

NodeDo::setParentId

predicates

public

public function setParentId(
      Parameter #0 [ <required> ?int $parent_id ]
 ): void
param ?int $parent_id
return void

NodeDo::getName

predicates

public

public function getName(): ?string
return ?string

NodeDo::setName

predicates

public

public function setName(
      Parameter #0 [ <required> ?string $name ]
 ): void
param ?string $name
return void

NodeDo::getAlias

predicates

public

public function getAlias(): ?string
return ?string

NodeDo::setAlias

predicates

public

public function setAlias(
      Parameter #0 [ <required> ?string $alias ]
 ): void
param ?string $alias
return void

NodeDo::getNature

predicates

public

public function getNature(): ?string
return ?string

NodeDo::setNature

predicates

public

public function setNature(
      Parameter #0 [ <required> ?string $nature ]
 ): void
param ?string $nature
return void

NodeDo::isPublic

predicates

public

public function isPublic(): bool
return bool

NodeDo::setPublic

predicates

public

public function setPublic(
      Parameter #0 [ <required> bool $public ]
 ): void
param bool $public
return void

NodeDo::getEstimate

predicates

public

public function getEstimate(): float
return float

NodeDo::setEstimate

predicates

public

public function setEstimate(
      Parameter #0 [ <required> float $estimate ]
 ): void
param float $estimate
return void

NodeDo::clone

predicates

public

implements

EntityInterface::clone

inherited from

Entity::clone

@inheritdoc

Create an Entity that equals this Entity

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

param int | null $ID
return Entity

@inheritdoc from method EntityInterface::clone

public function clone(
      Parameter #0 [ <optional> ?int $ID = NULL ]
 ): Entity
param ?int $ID
return Entity - Entity, similar to this one, with the given ID

NodeDo::toArray

predicates

public

implements

EntityInterface::toArray

inherited from

Entity::toArray

@inheritdoc

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().

return array - array with properties of this Entity

@inheritdoc from method EntityInterface::toArray

public function toArray(): array
return array - array with properties

NodeDo::getParents

predicates

public

inherited from

Entity::getParents

Get the (Reflection) parents of this Entity in reverse order

class A extends Entity

class B extends A

returned array = [Entity-Reflection, A-Reflection, B-Reflection]
public function getParents(): array
return array - array with ReflectionClass parents and this Entity

NodeDo::fromArray

predicates

public | static

implements

EntityInterface::fromArray

inherited from

Entity::fromArray

Create a new Entity

The order of the given array should be parent-first, i.e.:

class A extends Entity

class B extends A

In __construct(), toArray() and fromArray() functions, properties/parameters have the order:

ID, {props of A}, {props of B}

@inheritdoc

Create a new Entity from an array of properties

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

param array $arr - property array
return Entity - newly created Entity with the given properties

@inheritdoc from method EntityInterface::fromArray

public static function fromArray(
      Parameter #0 [ <required> array $arr ]
 ): static
param array $arr - array with properties
return static - Entity object

NodeDo::isSame

predicates

public

implements

EntityInterface::isSame

inherited from

Entity::isSame

@inheritdoc

Test is same function

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

param Entity $other - Entity to test
return bool - true if all properties, including ID, are equal, false otherwise

@inheritdoc from method EntityInterface::isSame

public function isSame(
      Parameter #0 [ <required> bhenk\msdata\abc\Entity $other ]
 ): bool
param Entity $other
return bool

NodeDo::equals

predicates

public

implements

EntityInterface::equals

inherited from

Entity::equals

@inheritdoc

Test equals function

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

param Entity $other - Entity to test
return bool - true if all properties are equal, false otherwise

@inheritdoc from method EntityInterface::equals

public function equals(
      Parameter #0 [ <required> bhenk\msdata\abc\Entity $other ]
 ): bool
param Entity $other
return bool

NodeDo::getID

predicates

public

implements

EntityInterface::getID

inherited from

Entity::getID

@inheritdoc

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

return int | null - ID of this Entity or null

@inheritdoc from method EntityInterface::getID

public function getID(): ?int
return ?int

NodeDo::__toString

predicates

public

implements

Stringable::__toString

inherited from

Entity::__toString

String representation of this Entity

public function __toString(): string
return string - representing this Entity

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