Skip to content

Instantly share code, notes, and snippets.

@kaystrobach
Last active December 28, 2015 12:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kaystrobach/7500128 to your computer and use it in GitHub Desktop.
Save kaystrobach/7500128 to your computer and use it in GitHub Desktop.
Shows how to integrate Symfony console as proof of concept
<?php
namespace KayStrobach\Project\Aspects;
use TYPO3\Flow\Annotations as Flow;
/**
* Wraps around the \TYPO3\Flow\Cli\Response
*
* @Flow\Aspect
*/
class AroundCliResponseAspect {
/**
* Directly outputs all the data instead of storing it in the buffer
*
* @param \TYPO3\Flow\AOP\JoinPointInterface $joinPoint The current join point
* @return mixed Result of the target method
* @Flow\Around("method(TYPO3\Flow\Cli\Response->appendContent())")
*/
public function output(\TYPO3\Flow\AOP\JoinPointInterface $joinPoint) {
//$result = $joinPoint->getAdviceChain()->proceed($joinPoint);
#return $result;
echo $joinPoint->getMethodArgument('content');
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment