src/Database/Kernel.php
/**
	 * Sets whether database connections should run in a sandboxed mode. When true, all queries sent to databases will
	 * be accepted and logged as normal, but the queries will not actually execute.
	 *
	 * If a boolean is not supplied, returns the current state.
	 *
	 * @param bool|null $enabled
	 * @return bool
	 */
Sets whether database connections should run in a sandboxed mode. When true, all queries sent to databases will
be accepted and logged as normal, but the queries will not actually execute.

If a boolean is not supplied, returns the current state.

@param bool|null $enabled
@return bool
Sets whether database connections should run in a sandboxed mode . When true all queries sent to databases will be accepted and logged as normal but the queries will not actually execute . If a boolean is not supplied returns the current state . @param bool|null $enabled @return bool
public function sandboxMode($enabled = null) {
		if (is_null($enabled)) {
			return $this->sandboxEnabled;
		}
		if ($enabled && $this->validationEnabled) {
			$this->validationEnabled = false;
		}
		return $this->sandboxEnabled = $enabled;
	}
public function sandboxMode ( $ enabled = null ) { if ( is_null ( $ enabled ) ) { return $ this -> sandboxEnabled ; } if ( $ enabled && $ this -> validationEnabled ) { $ this -> validationEnabled = false ; } return $ this -> sandboxEnabled = $ enabled ; }
Sets whether database connections should run in a sandboxed mode.
Sets whether database connections should run in a sandboxed mode .