[TYPO3-english] Problem with extending my extension class
Dmitry Dulepov
dmitry at typo3.org
Thu Oct 16 17:42:21 CEST 2008
Hi!
Lars Haendler wrote:
> But when I make a new instance of my class $whateverObj = new
> whatevernewclass and use a function I get the error
Firsts, never "new" in TYPO3 but t3lib_div::makeInstance($className).
> Fatal error: Class 'tx_myextension_pi1' not found in
> /var/www/web42/html/typo3conf/ext/myextension/pi1/class.whatevernewclass.php
Not TYPO3–specific ;) You forgot to include your class in the PHP file.
require_once(t3lib_extMgm::extPath('myextension', 'pi1/class.tx_myextension_pi1.php'));
Buy my book about extension development ;)
--
Dmitry Dulepov
TYPO3 Core team
My TYPO3 book: http://www.packtpub.com/typo3-extension-development/book
In the blog: http://typo3bloke.net/post-details/iphone_as_productivity_tool/
More information about the TYPO3-english
mailing list