for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Go\Symfony\GoAopBundle\Tests\TestProject\Aspect;
use Go\Aop\Aspect;
use Go\Aop\Intercept\MethodInvocation;
use Go\Lang\Annotation\Before;
use Psr\Log\LoggerInterface;
/**
* Application logging aspect
*/
class LoggingAspect implements Aspect
{
* @var LoggerInterface
private $logger;
public function __construct(LoggerInterface $logger)
$this->logger = $logger;
}
* Writes a log info before method execution
*
* @param MethodInvocation $invocation
* @Before("@execution(Go\Symfony\GoAopBundle\Tests\TestProject\Annotation\Loggable)")
public function beforeMethod(MethodInvocation $invocation)
$this->logger->info($invocation, $invocation->getArguments());