Entity Class¶
- class Entity¶
Represents an entity
- __construct(string $name, ?string $alias = null)¶
Create a new instance of Entity
- Parameters:
$name (
string) –The entity name
- ..note::
$name must begin with an alphabetic character or an underscore, and may also contain digits and hyphens
$alias (
?string) – The entity alias (default: no alias)
- Returns:
A new instance of
Entity- Return type:
- exception InvalidArgumentException¶
Thrown if $name is invalid
- InvalidArgumentException::addAttribute(Attribute ...$attribute)¶
Add attribute(s) to an entity