Re: What is $this->

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I believe there are more offical answes available at around the web.

This is what I understand $this->

This is a base OO programming thing.

IN oo world you have to create new object to do someting.

like

$db = new adodb;

so after the generate object you will modify this object via functions.

$db->execSql($sql);

when you send this command, your class have to do someting with the object...

and program have to know which object?, because you can create unlimited 
amount of object from same code. So. $this points current object.

when you do someting with any object, inside of his class code his name was 
always $this.

Hope helps.

Sancar




On Monday 19 February 2007 02:52, Dick Richard wrote:
> Can someone explain what $this-> does and means. For example what does this
> bit ot php code mean?
>
> $this->SetFont('Arial','B',15);
>
> Thanks
>
> dvrichard@xxxxxxxxxxx

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux