Supplier
extends BaseEntity
in package
implements
IdentifiableInterface
uses
IdentifiableTrait
AbstractYes
Attributes
- #[MappedSuperclass]
- #[TableAlias]
- $alias: 'supplier'
Table of Contents
Interfaces
- IdentifiableInterface
- Entity with a simple integer primary key. Most entities have one (often via {@see \App\Core\Traits\Shared\Models\Entities\IdentifiableTrait}); texts and links with a composite key do not, which is why `getId()` is not on {@see \App\Core\Base\BaseEntity}. Code that needs the id of a generic entity asks for this interface (parameter type, template bound, `instanceof`).
Properties
- $activated : bool
- $code : string|null
- $deliveryDays : int|null
- $email : string|null
- $id : int|null
- $insertDatetime : DateTime
- $name : string
- $note : string|null
- $phone : string|null
Methods
- __construct() : mixed
- callInitMethods() : void
- Calls `init{TraitName}()` for every used trait that defines such a method.
- getActivated() : bool
- getAllTraits() : array<string, string>
- Returns all traits the class uses, including those used by parent classes and nested traits.
- getCode() : string|null
- getDeliveryDays() : int|null
- getEmail() : string|null
- getId() : int|null
- getInsertDatetime() : DateTime
- getName() : string
- getNote() : string|null
- getPhone() : string|null
- isActivated() : bool
- isPersisted() : bool
- setActivated() : $this
- setCode() : $this
- setDeliveryDays() : $this
- setEmail() : $this
- setId() : $this
- setInsertDatetime() : $this
- setName() : $this
- setNote() : $this
- setPhone() : $this
- getTraitsRecursive() : array<string, string>
- Walks the trait list recursively and collects nested traits too.
Properties
$activated
protected
bool
$activated
= true
Attributes
- #[Column]
- $name: 'activated'
- $type: 'boolean'
$code
protected
string|null
$code
= null
Attributes
- #[Column]
- $name: 'code'
- $type: 'string'
- $length: 30
- $nullable: true
$deliveryDays
protected
int|null
$deliveryDays
= null
Attributes
- #[Column]
- $name: 'delivery_days'
- $type: 'integer'
- $nullable: true
- $options: ['unsigned' => true]
protected
string|null
$email
= null
Attributes
- #[Column]
- $name: 'email'
- $type: 'string'
- $length: 255
- $nullable: true
$id
protected
int|null
$id
= null
Attributes
- #[Column]
- $name: 'supplier_id'
- $type: 'integer'
- $options: ['unsigned' => true]
- #[GeneratedValue]
- #[Id]
$insertDatetime
protected
DateTime
$insertDatetime
= new DateTime()
Attributes
- #[Column]
- $name: 'insert_datetime'
- $type: 'datetime'
$name
protected
string
$name
= ''
Attributes
- #[Column]
- $name: 'name'
- $type: 'string'
- $length: 255
$note
protected
string|null
$note
= null
Attributes
- #[Column]
- $name: 'note'
- $type: 'text'
- $nullable: true
$phone
protected
string|null
$phone
= null
Attributes
- #[Column]
- $name: 'phone'
- $type: 'string'
- $length: 255
- $nullable: true
Methods
__construct()
public
__construct([int|null $id = null ][, string $name = '' ][, string|null $code = null ][, string|null $email = null ][, string|null $phone = null ][, int|null $deliveryDays = null ][, string|null $note = null ][, bool $activated = true ][, DateTime $insertDatetime = new DateTime() ]) : mixed
Parameters
- $id : int|null = null
- $name : string = ''
- $code : string|null = null
- $email : string|null = null
- $phone : string|null = null
- $deliveryDays : int|null = null
- $note : string|null = null
- $activated : bool = true
- $insertDatetime : DateTime = new DateTime()
callInitMethods()
Calls `init{TraitName}()` for every used trait that defines such a method.
public
callInitMethods() : void
getActivated()
public
getActivated() : bool
Return values
boolgetAllTraits()
Returns all traits the class uses, including those used by parent classes and nested traits.
public
getAllTraits() : array<string, string>
Return values
array<string, string>getCode()
public
getCode() : string|null
Return values
string|nullgetDeliveryDays()
public
getDeliveryDays() : int|null
Return values
int|nullgetEmail()
public
getEmail() : string|null
Return values
string|nullgetId()
public
getId() : int|null
Return values
int|nullgetInsertDatetime()
public
getInsertDatetime() : DateTime
Return values
DateTimegetName()
public
getName() : string
Return values
stringgetNote()
public
getNote() : string|null
Return values
string|nullgetPhone()
public
getPhone() : string|null
Return values
string|nullisActivated()
public
isActivated() : bool
Return values
boolisPersisted()
public
isPersisted() : bool
Return values
boolsetActivated()
public
setActivated(bool $activated) : $this
Parameters
- $activated : bool
Return values
$thissetCode()
public
setCode(string|null $code) : $this
Parameters
- $code : string|null
Return values
$thissetDeliveryDays()
public
setDeliveryDays(int|null $deliveryDays) : $this
Parameters
- $deliveryDays : int|null
Return values
$thissetEmail()
public
setEmail(string|null $email) : $this
Parameters
- $email : string|null
Return values
$thissetId()
public
setId(int|null $id) : $this
Parameters
- $id : int|null
Return values
$thissetInsertDatetime()
public
setInsertDatetime(DateTime $insertDatetime) : $this
Parameters
- $insertDatetime : DateTime
Return values
$thissetName()
public
setName(string $name) : $this
Parameters
- $name : string
Return values
$thissetNote()
public
setNote(string|null $note) : $this
Parameters
- $note : string|null
Return values
$thissetPhone()
public
setPhone(string|null $phone) : $this
Parameters
- $phone : string|null
Return values
$thisgetTraitsRecursive()
Walks the trait list recursively and collects nested traits too.
private
static getTraitsRecursive(array<string, string> $traits) : array<string, string>
Parameters
- $traits : array<string, string>