mirror of
https://github.com/projectsend/projectsend.git
synced 2026-09-16 16:45:07 +00:00
6e47d76ba6
Client file sharing, rebuilt from the ground up: a private area per client, resumable uploads, folders, groups and categories, sharing with expiry dates and download limits, comments, file versions, an activity log, a REST API, and sixteen languages. This repository begins here. ProjectSend 2 was developed privately, and that development history is not published — the previous generation remains available, with its own history, at projectsend/legacy. Free software under the GNU General Public License v2, or (at your option) any later version.
33 lines
962 B
PHP
33 lines
962 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Modules\Platform\Attribution;
|
|
|
|
use App\Modules\Platform\Attribution\Events\ResolvingAttribution;
|
|
use Illuminate\Support\Facades\Event;
|
|
|
|
/**
|
|
* Whether this installation names ProjectSend on the surfaces its
|
|
* clients and visitors see, and in the mail it sends.
|
|
*
|
|
* Deliberately *not* a singleton, and deliberately not memoised. The
|
|
* answer is read twice per web request at most — once for the Inertia
|
|
* shared prop, once for the generator meta — and once per outgoing
|
|
* email. A queue worker stays alive for hours, so a cached answer here
|
|
* would keep sending mail with a footer the operator turned off that
|
|
* morning; the same reason Settings and EmailThemeService are read at
|
|
* send time rather than at boot.
|
|
*/
|
|
final class Attribution
|
|
{
|
|
public function visible(): bool
|
|
{
|
|
$event = new ResolvingAttribution;
|
|
|
|
Event::dispatch($event);
|
|
|
|
return $event->visible;
|
|
}
|
|
}
|