public function getInput($query){

		if(function_exists('readline'))
           $line = readline($query);

        if(!function_exists('readline')){

			echo($query);

			$stdin = fopen('php://stdin', 'r');
			$line = fgets($stdin);
		}

		if(function_exists("readline_add_history"))
			readline_add_history($line);

		return $line;
	}