private function replaceBindings($rules)
	{

		// If we have no bindings we can just return the rules
		if (empty($this->bindings))
		{
			return $rules;
		}

		// Get any global bindings to merge into all bindings
		// Global bindings allow binding values to all the rules
		$globalBinding = $this->getGlobalBindings();

		foreach ($rules as $field => $rule)
		{
			// Field specific bindings
			$bindings = $this->getBindings($field);

			// Merge global bindings
			if ( ! empty($globalBinding))
			{
				$bindings = $bindings + $globalBinding;
			}

			foreach ($bindings as $key => $value)
			{
				$token = $this->tokenPrefix.$key.$this->tokenSuffix;

				if (is_array($rule))
				{

					// Handle array type rule sets
					$rule = array_map(function($v) use ($value, $token) {

						return str_replace($token, $value, $v);

					}, $rule);

				}
				else {

					// Handle piped style rule set
					$rule = str_replace($token, $value, $rule);

				}
			}

			// Set field rule
			$rules[$field] = $rule;
		}

		return $rules;
	}