protected function quote($value)
	{
		//if string, quote and return
		if ( is_string($value) || is_int($value) )  
		{
			//call connector method to escape string
			$escaped = $this->connector->escape($value);

			//return escaped string
			return "'{$escaped}'";

		}

		//if input is array, loop through values escaping
		elseif ( is_array($value) ) 
		{
			//define array to contain new quoted values
			$buffer = array();

			//loop through the array one item at a time
			foreach ($value as $i) 
			{
				//quote string and add to the $buffer array container
				array_push($buffer,$this->quote($i));

				//join the array elements to form one string
				$buffer = join(", ", $buffer);

				//quote new string, put in parenthesis and return
				return "({$buffer})";

			}

		}

		//return null if null value was passed
		elseif ( is_null($value) ) 
		{
			//return null as string
			return 'NULL';

		}

		//if boolean, return interger value of boolean
		elseif ( is_bool($value) ) 
		{
			//get interger value and return
			return (int)$value;

		}

		//check if empty value was returned
		elseif ( empty($value) ) 
		{
			//return empty string
			return "' '";

		}

		//if input value does not fall among any of these, escape and return output
		else return $this->connector->escape($value);

	}