smarty 模板中 使用 对象 调用对象 方法

{* access our registered object *} {foobar->meth1 p1='foo' p2=$bar} <?php // registering the object (will be by reference) $smarty->register_object('foobar',$myobj); // if we want to restrict access to certain methods or properties, list them $smarty->register_object('foobar',$myobj,array('meth1','meth2','prop1')); 

 

 

你可能感兴趣的:(object,properties,list,Access,reference,methods)