MediaWiki master
SequenceSpec.php
Go to the documentation of this file.
1<?php
2
3namespace Wikimedia\WRStats;
4
12 public const DEFAULT_TIME_STEP = 600;
13
15 public const DEFAULT_EXPIRY = 3600;
16
18 public $name;
20 public $timeStep;
25
29 public function __construct( array $spec ) {
30 $this->timeStep = $spec['timeStep'] ?? self::DEFAULT_TIME_STEP;
31 $this->softExpiry = $spec['expiry'] ?? self::DEFAULT_EXPIRY;
32 $this->hardExpiry = (int)ceil( $this->softExpiry + $this->timeStep );
33 $this->name = $spec['name'] ?? '';
34 }
35}
Class representation of normalized sequence specifications.
const DEFAULT_EXPIRY
The default expiry time (seconds)
const DEFAULT_TIME_STEP
The default time bucket size (seconds)