Exemple #1
0
	public function __toString()
	{
		try {
			return (string) $this->getPrimary();
		} catch (Exception $e) {
			NDebugger::toStringException($e);
		}
	}
Exemple #2
0
	/**
	 * Outputs image to string.
	 * @return string
	 */
	public function __toString()
	{
		try {
			return $this->toString();

		} catch (Exception $e) {
			NDebugger::toStringException($e);
		}
	}
Exemple #3
0
	/**
	 * Converts link to URL.
	 * @return string
	 */
	public function __toString()
	{
		try {
			return $this->component->link($this->destination, $this->params);

		} catch (Exception $e) {
			NDebugger::toStringException($e);
		}
	}
Exemple #4
0
	/**
	 * Renders template to string.
	 * @param  bool  can throw exceptions? (hidden parameter)
	 * @return string
	 */
	public function __toString()
	{
		$args = func_get_args();
		ob_start();
		try {
			$this->render();
			return ob_get_clean();

		} catch (Exception $e) {
			ob_end_clean();
			if ($args && $args[0]) {
				throw $e;
			} else {
				NDebugger::toStringException($e);
			}
		}
	}
Exemple #5
0
	/**
	 * Renders form to string.
	 * @return bool  can throw exceptions? (hidden parameter)
	 * @return string
	 */
	public function __toString()
	{
		try {
			return $this->getRenderer()->render($this);

		} catch (Exception $e) {
			if (func_get_args() && func_get_arg(0)) {
				throw $e;
			} else {
				NDebugger::toStringException($e);
			}
		}
	}