src/UI/DevOutput.php
public function setChannel( $channel = NULL )
	{
		if( !is_string( $channel ) )
			$channel	= 'auto';
		$channel	= strtolower( $channel );
		if( !in_array( $channel, array( 'auto', 'console', 'html' ) ) )
			throw new OutOfRangeException( 'Channel type "'.$channel.'" is not supported' );
		if( $channel === "auto" ){
			$channel	= 'html';
			if( getEnv( 'PROMPT' ) || getEnv( 'SHELL' ) || $channel == "console" )
				$channel	= 'console';
		}
		$this->channel	= $channel;
	}
public function setChannel( $channel = NULL )
	{
		if( !is_string( $channel ) )
			$channel	= 'auto';
		$channel	= strtolower( $channel );
		if( !in_array( $channel, array( 'auto', 'console', 'html' ) ) )
			throw new OutOfRangeException( 'Channel type "'.$channel.'" is not supported' );
		if( $channel === "auto" ){
			$channel	= 'html';
			if( getEnv( 'PROMPT' ) || getEnv( 'SHELL' ) || $channel == "console" )
				$channel	= 'console';
		}
		$this->channel	= $channel;
	}
public function setChannel ( $ channel = NULL ) { if ( ! is_string ( $ channel ) ) $ channel = 'auto' ; $ channel = strtolower ( $ channel ) ; if ( ! in_array ( $ channel , array ( 'auto' , 'console' , 'html' ) ) ) throw new OutOfRangeException ( 'Channel type "' . $ channel . '" is not supported' ) ; if ( $ channel === "auto" ) { $ channel = 'html' ; if ( getEnv ( 'PROMPT' ) || getEnv ( 'SHELL' ) || $ channel == "console" ) $ channel = 'console' ; } $ this -> channel = $ channel ; }
Sets output channel type.
Auto mode assumes HTML at first and will fall back to Console if detected.
@access		public
@param		string		$channel		Type of channel (auto, console, html);
@return		void
@throws		OutOfRangeException			if an invalid channel type is to be set
Sets output channel type . Auto mode assumes HTML at first and will fall back to Console if detected .