[TYPO3-mvc] Fluid doesn't print the __toString() return value of a custom object
Thomas "Thasmo" Deinhamer
thasmo at gmail.com
Fri Jan 29 23:41:54 CET 2010
Good evening,
it seems Fluid does not print a custom property.
This won't work:
myobject.php:
class MyObject {
public function __toString() {
return 'test';
}
}
controller.php:
public function indexAction() {
$this->view->assign('object', new MyObject);
}
index.html:
This is a {object}.
If this is done with a model object,
Fluid will trigger the __toString() method,
but in this case it seems not.
Is this a bug or a feature? ;o)
Thanks,
Thomas
More information about the TYPO3-project-typo3v4mvc
mailing list