WP_CLI

Configurator::__construct()publicWP-CLI 1.0

Method of the class: Configurator{}

No Hooks.

Return

null. Nothing.

Usage

$Configurator = new Configurator();
$Configurator->__construct( $path );
$path(string) (required)
Path to config spec file.

Configurator::__construct() code WP-CLI 2.8.0-alpha

public function __construct( $path ) {
	$this->load_config_spec( $path );

	$defaults = [
		'runtime'  => false,
		'file'     => false,
		'synopsis' => '',
		'default'  => null,
		'multiple' => false,
	];

	foreach ( $this->spec as $key => &$details ) {
		$details = array_merge( $defaults, $details );

		$this->config[ $key ] = $details['default'];
	}
}