AdvertStatistic
extends AdvertStatistic
in package
Attributes
- #[Entity]
- #[Table]
- $name: 'cms_mod_comcat_advert_statistics'
- #[TableAlias]
- 'advertStatistic'
Table of Contents
Properties
- $advertId : int|null
- $date : DateTime|null
- $viewsDetail : int
- $viewsList : int
Methods
- __construct() : mixed
- callInitMethods() : void
- Calls `init{TraitName}()` for every used trait that defines such a method.
- getAdvertId() : int|null
- getAllTraits() : array<string, string>
- Returns all traits the class uses, including those used by parent classes and nested traits.
- getDate() : DateTime|null
- getViewsDetail() : int
- getViewsList() : int
- incrementViewsDetail() : $this
- Increment detail views
- incrementViewsList() : $this
- Increment list views
- setAdvertId() : $this
- setDate() : $this
- setViewsDetail() : $this
- setViewsList() : $this
- getTraitsRecursive() : array<string, string>
- Walks the trait list recursively and collects nested traits too.
Properties
$advertId
protected
int|null
$advertId
= null
Attributes
- #[Column]
- $name: 'cms_mod_comcat_adverts_advert_id'
- $type: 'integer'
- $options: ['unsigned' => true]
- #[Id]
- #[Identity]
$date
protected
DateTime|null
$date
= null
Attributes
- #[Column]
- $name: 'date'
- $type: 'date'
- #[Id]
- #[Identity]
$viewsDetail
protected
int
$viewsDetail
= 0
Attributes
- #[Column]
- $name: 'views_detail'
- $type: 'integer'
$viewsList
protected
int
$viewsList
= 0
Attributes
- #[Column]
- $name: 'views_list'
- $type: 'integer'
Methods
__construct()
public
__construct([int|null $advertId = null ][, DateTime|null $date = null ][, int $viewsDetail = 0 ][, int $viewsList = 0 ]) : mixed
Parameters
- $advertId : int|null = null
- $date : DateTime|null = null
- $viewsDetail : int = 0
- $viewsList : int = 0
callInitMethods()
Calls `init{TraitName}()` for every used trait that defines such a method.
public
callInitMethods() : void
getAdvertId()
public
getAdvertId() : int|null
Return values
int|nullgetAllTraits()
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>getDate()
public
getDate() : DateTime|null
Return values
DateTime|nullgetViewsDetail()
public
getViewsDetail() : int
Return values
intgetViewsList()
public
getViewsList() : int
Return values
intincrementViewsDetail()
Increment detail views
public
incrementViewsDetail([int $count = 1 ]) : $this
Parameters
- $count : int = 1
Return values
$thisincrementViewsList()
Increment list views
public
incrementViewsList([int $count = 1 ]) : $this
Parameters
- $count : int = 1
Return values
$thissetAdvertId()
public
setAdvertId(int|null $advertId) : $this
Parameters
- $advertId : int|null
Return values
$thissetDate()
public
setDate(DateTime|null $date) : $this
Parameters
- $date : DateTime|null
Return values
$thissetViewsDetail()
public
setViewsDetail(int $viewsDetail) : $this
Parameters
- $viewsDetail : int
Return values
$thissetViewsList()
public
setViewsList(int $viewsList) : $this
Parameters
- $viewsList : int
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>