• 此项目
    • 正在载入...
  • 登录

周海龙 / globalso-v6-c-customer · 文件

转到一个项目
%e5%85%a8%e7%90%83%e6%90%9clogo 400px

GitLab

  • 转到仪表盘
  • 项目
  • 活动
  • 文件
  • 提交
  • 管道 0
  • 构建 0
  • 图表
  • 里程碑
  • 问题 0
  • 合并请求 0
  • 成员
  • 标记
  • 维基
  • 派生
  • 网络
  • 创建新的问题
  • globalso-v6-c-customer
  • vendor
  • facade
  • flare-client-php
  • src
  • Glows
  • Recorder.php
  • a
    0db707d4
    Your Name 在
    2024-05-22 10:05:11 +0800
    提交 浏览文件
Recorder.php 448 字节
原文件 审查 历史 永久链接
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
<?php

namespace Facade\FlareClient\Glows;

class Recorder
{
    public const GLOW_LIMIT = 30;

    private $glows = [];

    public function record(Glow $glow)
    {
        $this->glows[] = $glow;

        $this->glows = array_slice($this->glows, static::GLOW_LIMIT * -1, static::GLOW_LIMIT);
    }

    public function glows(): array
    {
        return $this->glows;
    }

    public function reset()
    {
        $this->glows = [];
    }
}