src/UI/HTML/Tag.php
public function setContent( $content = NULL )
	{
		if( is_object( $content ) ){
			if( !method_exists( $content, '__toString' ) ){											//  content is not a renderable object
				$message	= 'Object of class "'.get_class( $content ).'" cannot be rendered';		//  prepare message about not renderable object
				throw new InvalidArgumentException( $message ); 									//  break with error message
			}
			$content	= (string) $content;														//  render object to string
		}
		$this->content	= $content;
	}
public function setContent( $content = NULL )
	{
		if( is_object( $content ) ){
			if( !method_exists( $content, '__toString' ) ){											//  content is not a renderable object
				$message	= 'Object of class "'.get_class( $content ).'" cannot be rendered';		//  prepare message about not renderable object
				throw new InvalidArgumentException( $message ); 									//  break with error message
			}
			$content	= (string) $content;														//  render object to string
		}
		$this->content	= $content;
	}
public function setContent ( $ content = NULL ) { if ( is_object ( $ content ) ) { if ( ! method_exists ( $ content , '__toString' ) ) { //  content is not a renderable object $ message = 'Object of class "' . get_class ( $ content ) . '" cannot be rendered' ; //  prepare message about not renderable object throw new InvalidArgumentException ( $ message ) ; //  break with error message } $ content = ( string ) $ content ; //  render object to string } $ this -> content = $ content ; }
Sets Content of Tag.
@access		public
@param		string|object	$content	Content of Tag or stringable object
@return		void
@throws		InvalidArgumentException	if given object has no __toString method
Sets Content of Tag .