MailPoet\EmailEditor

Container::set()publicWC 1.0

The method for registering a new service

Method of the class: Container{}

No Hooks.

Return

null. Nothing (null).

Usage

$Container = new Container();
$Container->set( $name, $callback ): void;
$name(string) (required)
The name of the service.
$callback(callable) (required)
The callable that will be used to create the service.

Container::set() code WC 9.8.2

public function set( string $name, callable $callback ): void {
	$this->services[ $name ] = $callback;
}