PaymentItem
extends BaseEntity
in package
implements
IdentifiableInterface
uses
IdentifiableTrait
AbstractYes
Tags
Attributes
- #[MappedSuperclass]
- #[TableAlias]
- $alias: 'paymentItem'
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
- $active : bool
- $advert : TAdvert|null
- $advertId : int
- $categoryId : int|null
- $id : int|null
- $insertDatetime : DateTime
- $insertIp : string|null
- $paymentId : int|null
- $tariffId : int|null
- $userId : int|null
- $validityDatetime : DateTime|null
Methods
- __construct() : mixed
- callInitMethods() : void
- Calls `init{TraitName}()` for every used trait that defines such a method.
- getActive() : bool
- getAdvert() : TAdvert|null
- getAdvertId() : int
- getAllTraits() : array<string, string>
- Returns all traits the class uses, including those used by parent classes and nested traits.
- getCategoryId() : int|null
- getId() : int|null
- getInsertDatetime() : DateTime
- getInsertIp() : string|null
- getPaymentId() : int|null
- getTariffId() : int|null
- getUserId() : int|null
- getValidityDatetime() : DateTime|null
- isActive() : bool
- isExpired() : bool
- Check if payment item has expired
- isPersisted() : bool
- isValid() : bool
- Check if payment item is still valid
- setActive() : $this
- setAdvert() : $this
- setAdvertId() : $this
- setCategoryId() : $this
- setId() : $this
- setInsertDatetime() : $this
- setInsertIp() : $this
- setPaymentId() : $this
- setTariffId() : $this
- setUserId() : $this
- setValidityDatetime() : $this
- getTraitsRecursive() : array<string, string>
- Walks the trait list recursively and collects nested traits too.
Properties
$active
protected
bool
$active
= false
Attributes
- #[Column]
- $name: 'active'
- $type: 'boolean'
$advert
protected
TAdvert|null
$advert
= null
$advertId
protected
int
$advertId
= 0
Attributes
- #[Column]
- $name: 'cms_mod_bazaar_adverts_advert_id'
- $type: 'integer'
- $options: ['unsigned' => true]
$categoryId
protected
int|null
$categoryId
= null
Attributes
- #[Column]
- $name: 'cms_mod_bazaar_categories_category_id'
- $type: 'integer'
- $nullable: true
- $options: ['unsigned' => true]
$id
protected
int|null
$id
= null
Attributes
- #[Column]
- $name: 'payment_item_id'
- $type: 'integer'
- $options: ['unsigned' => true]
- #[GeneratedValue]
- #[Id]
$insertDatetime
protected
DateTime
$insertDatetime
= new DateTime()
Attributes
- #[Column]
- $name: 'insert_datetime'
- $type: 'datetime'
$insertIp
protected
string|null
$insertIp
= null
Attributes
- #[Column]
- $name: 'insert_ip'
- $type: 'string'
- $length: 45
- $nullable: true
- #[PersonalData]
- PersonalDataKind::Hidden
$paymentId
protected
int|null
$paymentId
= null
Attributes
- #[Column]
- $name: 'cms_system_payments_payment_id'
- $type: 'integer'
- $nullable: true
- $options: ['unsigned' => true]
$tariffId
protected
int|null
$tariffId
= null
Attributes
- #[Column]
- $name: 'cms_mod_bazaar_advert_tariffs_advert_tariff_id'
- $type: 'integer'
- $nullable: true
- $options: ['unsigned' => true]
$userId
protected
int|null
$userId
= null
Attributes
- #[Column]
- $name: 'cms_system_users_user_id'
- $type: 'integer'
- $nullable: true
- $options: ['unsigned' => true]
$validityDatetime
protected
DateTime|null
$validityDatetime
= null
Attributes
- #[Column]
- $name: 'validity_datetime'
- $type: 'datetime'
- $nullable: true
Methods
__construct()
public
__construct([int|null $id = null ][, int $advertId = 0 ][, int|null $tariffId = null ][, int|null $categoryId = null ][, int|null $paymentId = null ][, int|null $userId = null ][, DateTime|null $validityDatetime = null ][, DateTime $insertDatetime = new DateTime() ][, string|null $insertIp = null ][, bool $active = false ][, mixed $advert = null ]) : mixed
Parameters
- $id : int|null = null
- $advertId : int = 0
- $tariffId : int|null = null
- $categoryId : int|null = null
- $paymentId : int|null = null
- $userId : int|null = null
- $validityDatetime : DateTime|null = null
- $insertDatetime : DateTime = new DateTime()
- $insertIp : string|null = null
- $active : bool = false
- $advert : mixed = null
callInitMethods()
Calls `init{TraitName}()` for every used trait that defines such a method.
public
callInitMethods() : void
getActive()
public
getActive() : bool
Return values
boolgetAdvert()
public
getAdvert() : TAdvert|null
Return values
TAdvert|nullgetAdvertId()
public
getAdvertId() : int
Return values
intgetAllTraits()
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>getCategoryId()
public
getCategoryId() : int|null
Return values
int|nullgetId()
public
getId() : int|null
Return values
int|nullgetInsertDatetime()
public
getInsertDatetime() : DateTime
Return values
DateTimegetInsertIp()
public
getInsertIp() : string|null
Return values
string|nullgetPaymentId()
public
getPaymentId() : int|null
Return values
int|nullgetTariffId()
public
getTariffId() : int|null
Return values
int|nullgetUserId()
public
getUserId() : int|null
Return values
int|nullgetValidityDatetime()
public
getValidityDatetime() : DateTime|null
Return values
DateTime|nullisActive()
public
isActive() : bool
Return values
boolisExpired()
Check if payment item has expired
public
isExpired() : bool
Return values
boolisPersisted()
public
isPersisted() : bool
Return values
boolisValid()
Check if payment item is still valid
public
isValid() : bool
Return values
boolsetActive()
public
setActive(bool $active) : $this
Parameters
- $active : bool
Return values
$thissetAdvert()
public
setAdvert(TAdvert|null $advert) : $this
Parameters
- $advert : TAdvert|null
Return values
$thissetAdvertId()
public
setAdvertId(int $advertId) : $this
Parameters
- $advertId : int
Return values
$thissetCategoryId()
public
setCategoryId(int|null $categoryId) : $this
Parameters
- $categoryId : int|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
$thissetInsertIp()
public
setInsertIp(string|null $insertIp) : $this
Parameters
- $insertIp : string|null
Return values
$thissetPaymentId()
public
setPaymentId(int|null $paymentId) : $this
Parameters
- $paymentId : int|null
Return values
$thissetTariffId()
public
setTariffId(int|null $tariffId) : $this
Parameters
- $tariffId : int|null
Return values
$thissetUserId()
public
setUserId(int|null $userId) : $this
Parameters
- $userId : int|null
Return values
$thissetValidityDatetime()
public
setValidityDatetime(DateTime|null $validityDatetime) : $this
Parameters
- $validityDatetime : DateTime|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>