在TYPO3中手动创建带注释的对象实例

时间:2014-09-15 14:59:24

标签: annotations typo3

在TYPO3 CMS 6.2的控制器中,是否可以创建一个激活了所有注释的对象实例?例如,以下工作无效:

$mapper = new \TYPO3\CMS\Extbase\Property\PropertyMapper();

1 个答案:

答案 0 :(得分:0)

/**
 * @var \TYPO3\CMS\Extbase\Object\ObjectManagerInterface
 * @inject
 */
protected $objectManager;

$instance = $this->objectManager->get('Your\Class\Name');