Created
April 16, 2012 15:24
-
-
Save kitsunet/2399452 to your computer and use it in GitHub Desktop.
FLOW3 Training
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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 { | |
} | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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()); | |
} | |
} | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- | |
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