src/classes/CCCli.php
public static function confirm( $question, $strict = false ) 
	{
		$question .= ' [yes/no]: ';
		
		if ( $strict ) 
		{
			do 
			{
				$res = strtolower( static::read( $question ) );
			} 
			while ( $res !== 'yes' && $res !== 'no' );
			
			return ( $res == 'yes' ) ? true : false;
		}
		
		do 
		{
			$res = strtolower( static::read( $question ) );
		} 
		while ( empty( $res ) );
		
		$positives = array(
			'yes', 'y', 'ya', 'ye', 'yeah', 'yup',
			'jep', 'jap', 'ja', 
			'si', 'sim',
			'true',
			'hai',
			'oui',
			'no problemo',
		);
		
		return in_array( $res, $positives );
	}
public static function confirm( $question, $strict = false ) 
	{
		$question .= ' [yes/no]: ';
		
		if ( $strict ) 
		{
			do 
			{
				$res = strtolower( static::read( $question ) );
			} 
			while ( $res !== 'yes' && $res !== 'no' );
			
			return ( $res == 'yes' ) ? true : false;
		}
		
		do 
		{
			$res = strtolower( static::read( $question ) );
		} 
		while ( empty( $res ) );
		
		$positives = array(
			'yes', 'y', 'ya', 'ye', 'yeah', 'yup',
			'jep', 'jap', 'ja', 
			'si', 'sim',
			'true',
			'hai',
			'oui',
			'no problemo',
		);
		
		return in_array( $res, $positives );
	}
public static function confirm ( $ question , $ strict = false ) { $ question .= ' [yes/no]: ' ; if ( $ strict ) { do { $ res = strtolower ( static :: read ( $ question ) ) ; } while ( $ res !== 'yes' && $ res !== 'no' ) ; return ( $ res == 'yes' ) ? true : false ; } do { $ res = strtolower ( static :: read ( $ question ) ) ; } while ( empty ( $ res ) ) ; $ positives = array ( 'yes' , 'y' , 'ya' , 'ye' , 'yeah' , 'yup' , 'jep' , 'jap' , 'ja' , 'si' , 'sim' , 'true' , 'hai' , 'oui' , 'no problemo' , ) ; return in_array ( $ res , $ positives ) ; }
Get a bool value from the user
This will write the question down and waiting for a yes or no.

When strict is true, it wil only accept yes or no. And not y, n, jep etc.

@param string		$question
@param bool		$strict
@return bool
Get a bool value from the user This will write the question down and waiting for a yes or no .