First fully working version of saving snips content with git control

This commit is contained in:
Tim
2023-04-04 23:23:53 +02:00
parent 1a7c9bb25a
commit 842c936d8c
12 changed files with 170 additions and 17 deletions

View File

@ -0,0 +1,22 @@
<?php
namespace App\Service;
use App\Entity\Snip;
use Symfony\Bundle\SecurityBundle\Security;
class SnipServiceFactory
{
public function __construct(
private readonly string $snipBasePath,
private readonly Security $security,
)
{
}
public function create(Snip $snip): SnipService
{
return new SnipService($snip, $this->snipBasePath, $this->security->getUser());
}
}