for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/*
* This file is part of the BenGorFile package.
*
* (c) Beñat Espiña <[email protected]>
* (c) Gorka Laucirica <[email protected]>
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace BenGorFile\FileBundle\DependencyInjection\Compiler\Application\Query;
use BenGorFile\File\Application\Query\FileOfIdHandler;
use Symfony\Component\DependencyInjection\Definition;
/**
* File of id query builder.
* @author Beñat Espiña <[email protected]>
class FileOfIdQueryBuilder extends QueryBuilder
{
* {@inheritdoc}
public function register($file)
$this->container->setDefinition(
$this->definitionName($file),
(new Definition(
FileOfIdHandler::class, [
$this->container->getDefinition(
'bengor.file.infrastructure.persistence.' . $file . '_repository'
),
'bengor.file.application.data_transformer.' . $file . '_dto'
]
))->setPublic(false)
);
}
protected function definitionName($file)
return 'bengor.file.application.query.' . $file . '_of_id';
protected function aliasDefinitionName($file)
return 'bengor_file.' . $file . '.by_id_query';