[TYPO3-mvc] Extbase 1.3 and CLI
Dennis Ahrens
dennis.ahrens at googlemail.com
Wed Apr 27 10:21:52 CEST 2011
Hi Thorsten,
On 26.04.2011 19:02, Torsten Blindert wrote:
> Now I want to access my controllers, models, repositories via the command line interface.
> Is there a "right" way to do this?
I think the "right" way would be a RequestHandler for CLI requests, but
i think currently there is no ready to use implementation available.
Another idea is using the Scheduler. You can initialize extbase using
the bootstrap like this in the task:
$extbaseCore = t3lib_div::makeInstance("Tx_Extbase_Core_Bootstrap");
$extbaseCore->initialize(array(
"extensionName" => "FhhForschungsprojekte",
"pluginName" =>
"txfhhlibmain_FhhForschungsprojekteForschungsprojektmanager" //module
name in our case
));
$this->objectManager =
t3lib_div::makeInstance('Tx_Extbase_Object_ObjectManager');
This sample code just initializes the ObjectManager to use some Services
and Repositories afterwards. Have a look at the framework configuration
to point out how to hand over a controller/action combination (into
initialize()). Use Tx_Extbase_Core_Bootstrap->run() to call the action than.
regards
Dennis
More information about the TYPO3-project-typo3v4mvc
mailing list