mirror of
https://github.com/kevinveenbirkenbach/infinito.git
synced 2025-01-10 06:27:24 +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 Doctrine\ORM\EntityRepository;
|
||||||
use App\Entity\Source\SourceInterface;
|
use App\Entity\Source\SourceInterface;
|
||||||
|
use App\Domain\SourceManagement\RequestedSourceInterface;
|
||||||
|
|
||||||
final class SourceRepository extends EntityRepository
|
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.
|
* Loads a source by id or if not defined, by slug.
|
||||||
*
|
*
|
||||||
* @param SourceInterface $requestedSource
|
* @param RequestedSourceInterface $requestedSource
|
||||||
*
|
*
|
||||||
* @return SourceInterface|null
|
* @return SourceInterface|null
|
||||||
*/
|
*/
|
||||||
public function findOneByIdOrSlug(SourceInterface $requestedSource): ?SourceInterface
|
public function findOneByIdOrSlug(RequestedSourceInterface $requestedSource): ?SourceInterface
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
return $this->find($requestedSource->getId());
|
return $this->find($requestedSource->getId());
|
||||||
|
Loading…
Reference in New Issue
Block a user