for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/*
* This file is part of the Borobudur-Event-Sourcing package.
*
* (c) Hexacodelabs <http://hexacodelabs.com>
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Borobudur\EventSourcing\Entity;
use Borobudur\Cqrs\Message\DomainEventInterface;
/**
* @author Iqbal Maulana <[email protected]>
* @created 8/20/15
trait EntityNamingTrait
{
* Get method name for apply domain event.
* @param DomainEventInterface $event
* @return string
protected function getApplyMethodName(DomainEventInterface $event)
$parts = explode('\\', get_class($event));
return 'apply' . end($parts);
}