drsmithfr/symfony-political-choice

此库允许Symfony用户在乌克兰与俄罗斯持续冲突中选择他们的政治立场。

1.0.1 2023-03-27 17:15 UTC

This package is auto-updated.

Last update: 2024-09-27 20:27:19 UTC


README

此库允许Symfony用户在乌克兰与俄罗斯持续冲突中选择他们的政治立场。用户可以选择支持乌克兰、俄罗斯或世界和平。此外,用户可以禁用政治信息并返回正常的Symfony应用程序。

安装

您可以使用Composer安装此库

composer require drsmithfr/symfony-political-choice

用法

要使用此库,您必须覆盖您项目的bin/console文件。

#!/usr/bin/env php
<?php

use App\Kernel;
use DrSmithFr\ChooseYourSide\Application;

if (!is_file(dirname(__DIR__) . '/vendor/autoload_runtime.php')) {
    throw new LogicException('Symfony Runtime is missing. Try running "composer require symfony/runtime".');
}

require_once dirname(__DIR__).'/vendor/autoload_runtime.php';

return function (array $context) {
    $kernel = new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']);

    return new Application($kernel);
};

注意

默认情况下,此库将显示#StandWithPeace。

您可以通过将其作为应用程序的第二个参数传递来选择您的立场。

#!/usr/bin/env php
<?php

use App\Kernel;
use DrSmithFr\ChooseYourSide\Application;
use DrSmithFr\ChooseYourSide\Side;

if (!is_file(dirname(__DIR__) . '/vendor/autoload_runtime.php')) {
    throw new LogicException('Symfony Runtime is missing. Try running "composer require symfony/runtime".');
}

require_once dirname(__DIR__).'/vendor/autoload_runtime.php';

return function (array $context) {
    $kernel = new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']);

    return new Application($kernel, Side::APOLITICAL);
};

接受值

  • Side::APOLITICAL
  • Side::PEACE
  • Side::UKRAINE
  • Side::RUSSIA

安全

此库在设计时考虑了安全性。它不会收集或存储任何用户数据,并且所有用户选择都保持私密。