[TYPO3] pbsurvey - hook

Henjo Hoeksma hphoeksma at stylence.nl
Wed Aug 6 12:20:32 CEST 2008


On 2008-08-06 11:53:23 +0200, "Dmitry Dulepov [typo3]" <dmitry at typo3.org> said:

> Hi!
> 
> Henjo Hoeksma wrote:
>> I'm trying to use the hook in pbsurvey. I keep ending up with errors like:
>> 
>> Call to a member function hookItemProcessor() on a non-object
>> 
>> and
>> 
>> Cannot re-assign $this
>> 
>> Object oriented thinking obviously isn't my strongest point ;-)
>> 
>> My code so far:
>> <code>
>> class tx_kopbsurveyext {
>>         function hookItemProcessor($arrItem,$this) {
>>         $content = "test";
>>         return $content;
>>     }
>> 
>> }
>> </code>
>> Or wtihout $this for the first error...
> 
> You can't use $this in the function parameters. It is a reserved word 
> in PHP. Use &$pObj instead.

Hi Dmitry,

thank you for replying. Could you point out where I can find more 
background info on how to use this construction of &$pObj ? I feel 
kinda lost :-(

-- 
Met vriendelijke groet, kinds regards,

Henjo Hoeksma
Stylence | 2b launched soon!
www.stylence.nl



More information about the TYPO3-english mailing list