WP_CLI

ContextManager::register_context()publicWP-CLI 1.0

Register a context with WP-CLI.

Method of the class: ContextManager{}

No Hooks.

Return

null. Nothing (null).

Usage

$ContextManager = new ContextManager();
$ContextManager->register_context( $name, $implementation );
$name(string) (required)
Name of the context.
$implementation(Context) (required)
Implementation of the context.

ContextManager::register_context() code WP-CLI 2.8.0-alpha

public function register_context( $name, Context $implementation ) {
	$this->contexts[ $name ] = $implementation;
}