WP_CLI

Context{}WP-CLI 1.0

Context that can be selected in order to run commands within a properly set-up environment.

No Hooks.

Usage

$Context = new Context();
// use class methods

Methods

  1. public process( $config )

Context{} code WP-CLI 2.8.0-alpha

interface Context {

	const ADMIN    = 'admin';
	const AUTO     = 'auto';
	const CLI      = 'cli';
	const FRONTEND = 'frontend';

	/**
	 * Debugging group to use for all context-related debug messages.
	 *
	 * @var string
	 */
	const DEBUG_GROUP = 'context';

	/**
	 * Process the context to set up the environment correctly.
	 *
	 * @param array $config Associative array of configuration data.
	 * @return void
	 */
	public function process( $config );
}