Skip to content

Instantly share code, notes, and snippets.

@kitsunet
Created April 16, 2012 15:24
Show Gist options
  • Save kitsunet/2399452 to your computer and use it in GitHub Desktop.
Save kitsunet/2399452 to your computer and use it in GitHub Desktop.
FLOW3 Training
<?php
namespace Demo\Auto\Command;
/* *
* This script belongs to the FLOW3 framework. *
* *
* It is free software; you can redistribute it and/or modify it under *
* the terms of the GNU Lesser General Public License, either version 3 *
* of the License, or (at your option) any later version. *
* *
* The TYPO3 project - inspiring people to share! *
* */
use TYPO3\FLOW3\Annotations as FLOW3;
use TYPO3\FLOW3\Cli\Response;
use TYPO3\FLOW3\Utility\Files;
/**
* Command controller for managing autos
*
* NOTE: This command controller will run in compile time (as defined in the package bootstrap)
*
* @FLOW3\Scope("singleton")
*/
class AutoCommandController extends \TYPO3\FLOW3\Cli\CommandController {
}
?>
<?php
namespace Demo\Auto\Aspect;
/* *
* This script belongs to the FLOW3 framework. *
* *
* It is free software; you can redistribute it and/or modify it under *
* the terms of the GNU Lesser General Public License, either version 3 *
* of the License, or (at your option) any later version. *
* *
* The TYPO3 project - inspiring people to share! *
* */
use Doctrine\ORM\Mapping as ORM;
use TYPO3\FLOW3\Annotations as FLOW3;
/**
* @FLOW3\Aspect
*/
class LoggingAspect {
/**
* @FLOW3\Inject
* @var \TYPO3\FLOW3\Log\SystemLoggerInterface
*/
protected $loggingService;
/**
* @param TYPO3\FLOW3\Aop\JoinPointInterface $joinPoint
* @FLOW3\Before("method(.*StandardController->.*Action())")
*/
public function logAccessTime(\TYPO3\FLOW3\Aop\JoinPointInterface $joinPoint) {
$proxy = $joinPoint->getProxy();
$this->loggingService->log($joinPoint->getClassName() . '->' . $joinPoint->getMethodName());
}
}
?>
-
name: 'auto route detail'
uriPattern: 'auto/show/{car}'
defaults:
'@package': 'Demo.Auto'
'@action': 'show'
'@controller': 'Standard'
'@format': 'html'
appendExceedingArguments: true
routeParts:
car:
objectType: Demo\Auto\Domain\Model\Auto
uriPattern: '{name}'
-
name: 'auto route'
uriPattern: 'auto(/{@action})'
defaults:
'@package': 'Demo.Auto'
'@action': 'index'
'@controller': 'Standard'
'@format': 'html'
appendExceedingArguments: truea
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment