Page 1 of 1

class thingys

Posted: Thu Jan 05, 2006 4:02 am
by shiznatix
ok im starting on this project and the documentation has this kinda stuff

Code: Select all

$this->tmpl->exec('et_media.et_media.edit',$content);
now my question is in the $this->name->other...what does the 2 arrow things mean? i never saw that before.

Posted: Thu Jan 05, 2006 4:13 am
by Maugrim_The_Reaper
It means $tmpl is itself an object which is set as a property of the current ($this) object.

Kindof like having:

Code: Select all

class Template (

    function assign() {
        ...
    }

)

class AppHelper (

    var $tpl;

    function AppHelper($tpl) {
        $this->tpl = $tpl;
    }
)

$app = new AppHelper( new Template() );
$app->tpl->assign('value', 'property');