Skip to content

Commit

Permalink
Rename Medias => Media
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewnicols committed Jul 19, 2023
1 parent b6280bb commit 2d95795
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 17 deletions.
4 changes: 2 additions & 2 deletions application/src/Controller/BackOfficeController.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace App\Controller;

use App\Entity\ExternalId;
use App\Entity\Medias;
use App\Entity\Media;
use App\Entity\Password;
use App\Entity\RoomMember;
use App\Entity\Room;
Expand Down Expand Up @@ -104,7 +104,7 @@ public function backOfficeReset(string $serverID) : JsonResponse
$entities = [
User::class,
Room::class,
Medias::class
Media::class
];

$entityManager = $this->getDoctrine()->getManager();
Expand Down
4 changes: 2 additions & 2 deletions application/src/Controller/MediaController.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace App\Controller;

use App\Entity\Medias;
use App\Entity\Media;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\Routing\Annotation\Route;
Expand Down Expand Up @@ -58,7 +58,7 @@ public function uploadMedia(string $serverID, Request $request) : JsonResponse {
$filesystem = new Filesystem();
$filesystem->dumpFile($filepath, file_get_contents("php://input"));

$medias = new Medias();
$medias = new Media();
$medias->setContenturi($contenturi);
$medias->setServerid($serverID);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@

namespace App\Entity;

use App\Repository\MediasRepository;
use App\Repository\MediaRepository;
use Doctrine\ORM\Mapping as ORM;
use App\Entity\Room;
use App\Entity\User;

/**
* @ORM\Entity(repositoryClass=MediasRepository::class)
* @ORM\Entity(repositoryClass=MediaRepository::class)
*/
class Medias
class Media
{
/**
* @ORM\Id
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,32 +2,32 @@

namespace App\Repository;

use App\Entity\Medias;
use App\Entity\Media;
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
use Doctrine\ORM\OptimisticLockException;
use Doctrine\ORM\ORMException;
use Doctrine\Persistence\ManagerRegistry;

/**
* @extends ServiceEntityRepository<Medias>
* @extends ServiceEntityRepository<Media>
*
* @method Medias|null find($id, $lockMode = null, $lockVersion = null)
* @method Medias|null findOneBy(array $criteria, array $orderBy = null)
* @method Medias[] findAll()
* @method Medias[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null)
* @method Media|null find($id, $lockMode = null, $lockVersion = null)
* @method Media|null findOneBy(array $criteria, array $orderBy = null)
* @method Media[] findAll()
* @method Media[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null)
*/
class MediasRepository extends ServiceEntityRepository
class MediaRepository extends ServiceEntityRepository
{
public function __construct(ManagerRegistry $registry)
{
parent::__construct($registry, Medias::class);
parent::__construct($registry, Media::class);
}

/**
* @throws ORMException
* @throws OptimisticLockException
*/
public function add(Medias $entity, bool $flush = true): void
public function add(Media $entity, bool $flush = true): void
{
$this->_em->persist($entity);
if ($flush) {
Expand All @@ -39,7 +39,7 @@ public function add(Medias $entity, bool $flush = true): void
* @throws ORMException
* @throws OptimisticLockException
*/
public function remove(Medias $entity, bool $flush = true): void
public function remove(Media $entity, bool $flush = true): void
{
$this->_em->remove($entity);
if ($flush) {
Expand Down

0 comments on commit 2d95795

Please sign in to comment.