mirror of
https://github.com/kevinveenbirkenbach/infinito.git
synced 2025-01-09 22:17:26 +01:00
Implemented RequestedSource
This commit is contained in:
parent
054a136f14
commit
62257b1771
@ -0,0 +1,12 @@
|
||||
<?php
|
||||
|
||||
namespace App\Domain\SourceManagement;
|
||||
|
||||
use App\Entity\Source\AbstractSource;
|
||||
|
||||
/**
|
||||
* @author kevinfrantz
|
||||
*/
|
||||
final class RequestedSource extends AbstractSource implements RequestedSourceInterface
|
||||
{
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
<?php
|
||||
|
||||
namespace App\Domain\SourceManagement;
|
||||
|
||||
use App\Entity\Source\SourceInterface;
|
||||
|
||||
/**
|
||||
* @author kevinfrantz
|
||||
*/
|
||||
interface RequestedSourceInterface extends SourceInterface
|
||||
{
|
||||
}
|
@ -4,6 +4,7 @@ namespace App\Repository\Source;
|
||||
|
||||
use Doctrine\ORM\EntityRepository;
|
||||
use App\Entity\Source\SourceInterface;
|
||||
use App\Domain\SourceManagement\RequestedSourceInterface;
|
||||
|
||||
final class SourceRepository extends EntityRepository
|
||||
{
|
||||
@ -22,11 +23,11 @@ final class SourceRepository extends EntityRepository
|
||||
/**
|
||||
* Loads a source by id or if not defined, by slug.
|
||||
*
|
||||
* @param SourceInterface $requestedSource
|
||||
* @param RequestedSourceInterface $requestedSource
|
||||
*
|
||||
* @return SourceInterface|null
|
||||
*/
|
||||
public function findOneByIdOrSlug(SourceInterface $requestedSource): ?SourceInterface
|
||||
public function findOneByIdOrSlug(RequestedSourceInterface $requestedSource): ?SourceInterface
|
||||
{
|
||||
try {
|
||||
return $this->find($requestedSource->getId());
|
||||
|
Loading…
Reference in New Issue
Block a user