[TYPO3-dev] A problem using image manipulation in my own class file
Martin Kutschker
masi-no at spam-typo3.org
Wed Nov 19 12:49:42 CET 2008
Tapio Markula schrieb:
> Martin Kutschker
>> I don't want to offend you, but try and learn a bit about object
>> oriented programming in general and how objects and classes work in PHP.
>> The docs on php.net may be a starter.
>
> I admit my weakness concerning the 'new'.
> I have sucessfully used my own class files with Typo3, but I admit
> weakness in certain cases.
>
>> require_once ( PATH_site . 't3lib/class.t3lib_stdgraphic.php' );
>> class ux_t3lib_stdGraphic extends t3lib_stdGraphic {
>>
>> function main() {
>> $this->init();
>> // your stuff
>
> just didn't work
> Fatal error: Call to a member function init() on a non-object
You have called main like this?
$myStuff = new returnContent();
$myStuff->main();
$this womt work if you call it like this
returnContent::main()
Masi
More information about the TYPO3-dev
mailing list