StatsContentRepository
extends AbstractRepository
in package
implements
StatsContentRepositoryInterface
Class AbstractRepository.
Table of Contents
Interfaces
- StatsContentRepositoryInterface
- Interface StatsContentRepositoryInterface.
Properties
- $disableSponsor : mixed
- $skipPresenter : mixed
Methods
- buildQueryScopes() : mixed
- cleanContent() : string|null
- cleanTitle() : string|null
- collectStats() : array<string|int, mixed>
- createMany() : bool
- findStatContent() : StatsContent
- getChartData() : Collection
- getDeepStatistic() : array<string, mixed>
- getEmptyChartData() : array<string, mixed>
- getItemStatistic() : Collection
- getModel() : StatsContent
- getNowStats() : array<int, mixed>
- getSiteStatistic() : Collection
- getStatTypes() : array<string, mixed>
- getUserContractMorphTypeColumns() : array<string|int, string>
- hasSponsorView() : bool
- isNoSponsorView() : bool
- likeOperator() : string
- return the case-insensitive LIKE operator bases on the current database driver.
- logStat() : void
- model() : mixed
- recoverDayStat() : void
- recoverMonthStat() : void
- recoverWeekStat() : void
- recoverYearStat() : void
- toDateFormatByPeriod() : string
- where() : $this
- withUserMorphTypeActiveScope() : self
- parseNowPeriod() : Carbon|null
- Parsing period in human readable form into integer (in minutes).
- parsePeriod() : Carbon|null
- Parsing period in human readable form into integer (in minutes).
- getDayChartData() : array<string, mixed>
- getMonthChartData() : array<string, mixed>
- getWeekChartData() : array<string, mixed>
Properties
$disableSponsor
protected
mixed
$disableSponsor
$skipPresenter
protected
mixed
$skipPresenter
= true
Methods
buildQueryScopes()
public
buildQueryScopes(mixed $query, mixed $model, mixed $criteria) : mixed
Parameters
- $query : mixed
- $model : mixed
- $criteria : mixed
cleanContent()
public
cleanContent(string|null $string) : string|null
Parameters
- $string : string|null
Return values
string|nullcleanTitle()
public
cleanTitle(string|null $string) : string|null
Parameters
- $string : string|null
Return values
string|nullcollectStats()
public
collectStats(string|null $period, Carbon|null $after[, Carbon|null $before = null ][, string|null $group = null ]) : array<string|int, mixed>
Parameters
- $period : string|null
- $after : Carbon|null
- $before : Carbon|null = null
- $group : string|null = null
Return values
array<string|int, mixed>createMany()
public
createMany(array<string|int, mixed> $items) : bool
Parameters
- $items : array<string|int, mixed>
Return values
boolfindStatContent()
public
findStatContent(string $entityType[, string|null $period = null ]) : StatsContent
Parameters
- $entityType : string
- $period : string|null = null
Return values
StatsContentgetChartData()
public
getChartData([array<string|int, mixed> $attributes = [] ]) : Collection
Parameters
- $attributes : array<string|int, mixed> = []
Tags
Return values
CollectiongetDeepStatistic()
public
getDeepStatistic() : array<string, mixed>
Tags
Return values
array<string, mixed>getEmptyChartData()
public
getEmptyChartData([string|null $period = null ]) : array<string, mixed>
Parameters
- $period : string|null = null
Tags
Return values
array<string, mixed>getItemStatistic()
public
getItemStatistic() : Collection
Tags
Return values
CollectiongetModel()
public
getModel() : StatsContent
Return values
StatsContentgetNowStats()
public
getNowStats(string|null $period[, string|null $group = null ]) : array<int, mixed>
Parameters
- $period : string|null
- $group : string|null = null
Tags
Return values
array<int, mixed>getSiteStatistic()
public
getSiteStatistic() : Collection
Return values
CollectiongetStatTypes()
public
getStatTypes([array<string|int, mixed> $excludes = [] ]) : array<string, mixed>
Parameters
- $excludes : array<string|int, mixed> = []
Tags
Return values
array<string, mixed>getUserContractMorphTypeColumns()
public
getUserContractMorphTypeColumns() : array<string|int, string>
Return values
array<string|int, string>hasSponsorView()
public
hasSponsorView(array<string|int, mixed> $attributes) : bool
Parameters
- $attributes : array<string|int, mixed>
Return values
boolisNoSponsorView()
public
isNoSponsorView(string|null $view) : bool
Parameters
- $view : string|null
Return values
boollikeOperator()
return the case-insensitive LIKE operator bases on the current database driver.
public
likeOperator() : string
Return values
stringlogStat()
public
logStat([string|null $period = '5m' ]) : void
Parameters
- $period : string|null = '5m'
model()
public
model() : mixed
recoverDayStat()
public
recoverDayStat() : void
recoverMonthStat()
public
recoverMonthStat() : void
recoverWeekStat()
public
recoverWeekStat() : void
recoverYearStat()
public
recoverYearStat() : void
toDateFormatByPeriod()
public
toDateFormatByPeriod(string $period, Carbon $date) : string
Parameters
- $period : string
- $date : Carbon
Return values
stringwhere()
public
where(array<string|int, mixed> $params) : $this
Parameters
- $params : array<string|int, mixed>
Tags
Return values
$thiswithUserMorphTypeActiveScope()
public
withUserMorphTypeActiveScope() : self
Return values
selfparseNowPeriod()
Parsing period in human readable form into integer (in minutes).
protected
parseNowPeriod(string|null $period) : Carbon|null
Parameters
- $period : string|null
Return values
Carbon|nullparsePeriod()
Parsing period in human readable form into integer (in minutes).
protected
parsePeriod(string|null $period) : Carbon|null
Parameters
- $period : string|null
Return values
Carbon|nullgetDayChartData()
private
getDayChartData() : array<string, mixed>
Return values
array<string, mixed>getMonthChartData()
private
getMonthChartData() : array<string, mixed>
Return values
array<string, mixed>getWeekChartData()
private
getWeekChartData() : array<string, mixed>