/** * Magic method, returns the output of render(). If any exceptions are * thrown, the exception output will be returned instead. * * @return string */ public function __toString() { try { return $this->capture(); } catch (Exception $e) { Ko::exception_handler($e); return ''; } }