- Member | 30
this may be more a php question and showing my ignorance: I'm trying to understand the magic of nette – how is it we can create a form, treat it as an object and then just echo it?
$form = new Form; $form->addText('name', 'Name:') echo $form; // <-- why does this not break??
I know it renders using the default renderer by can't understand how and
where this becomes a string, or doesn't get an error like ‘object cannot be
converted to a string..’ etc
where's the magic hidden? can you point me to some classes and methods that achieve this?