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\Controller;
use BenGorFile\File\Application\Command\Remove\RemoveFileCommand;
use BenGorFile\File\Infrastructure\CommandBus\FileCommandBus;
/**
* BenGor file's remove action trait.
* @author Beñat Espiña <[email protected]>
trait RemoveAction
{
* Overwrite action.
* @param string $anId The file id
* @param FileCommandBus $aCommandBus The command bus
public function removeAction($anId, FileCommandBus $aCommandBus)
$aCommandBus->handle(
new RemoveFileCommand($anId)
);
}