the browser-facing portion of osu!
at master 657 B view raw
1<?php 2 3// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the GNU Affero General Public License v3.0. 4// See the LICENCE file in the repository root for full licence text. 5 6declare(strict_types=1); 7 8namespace App\Libraries\Opengraph; 9 10use App\Models\Contest; 11 12class ContestOpengraph implements OpengraphInterface 13{ 14 public function __construct(private Contest $contest) 15 { 16 } 17 18 public function get(): array 19 { 20 return [ 21 'description' => strip_tags(markdown($this->contest->currentDescription())), 22 'image' => $this->contest->header_url, 23 'title' => $this->contest->name, 24 ]; 25 } 26}