29 use Wikimedia\ObjectFactory;
30 use Wikimedia\Timestamp\ConvertibleTimestamp;
53 $this->ttlDays = $config[
'ttlDays'] ??
false;
65 $jrn = ObjectFactory::getObjectFromSpec(
67 [
'specIsArg' =>
true,
'assertClass' => __CLASS__ ]
81 for ( $i = 0; $i < 5; $i++ ) {
82 $s .= mt_rand( 0, 2147483647 );
84 $s = Wikimedia\base_convert( sha1(
$s ), 16, 36, 31 );
86 $timestamp = ConvertibleTimestamp::convert( TS_MW, time() );
88 return substr(
Wikimedia\base_convert( $timestamp, 10, 36, 9 ) .
$s, 0, 31 );
103 if ( $entries === [] ) {
170 if ( $limit && count( $entries ) > $limit ) {
171 $last = array_pop( $entries );