public function __toString()
{
if ($this->to_stringing) {
return 'Recursive __toString';
}
$this->to_stringing = true;
try {
if ($this->output_mode === 'render') {
$output = $this->render();
} else {
$output = (string) $this->getOne();
}
$this->to_stringing = false;
return $output;
} catch (Exception $e) {
$this->app->caughtException($e);
//return "Exception: ".$e->getMessage();
}
$output = $this->__toString();
$this->to_stringing = false;
return $output;
}