src/mako/syringe/Container.php
public function onReplace(string $hint, callable $replacer, ?string $eventName = null): void
	{
		$hint = $this->resolveAlias($hint);

		$eventName === null ? ($this->replacers[$hint][] = $replacer) : ($this->replacers[$hint][$eventName] = $replacer);
	}
public function onReplace(string $hint, callable $replacer, ?string $eventName = null): void
	{
		$hint = $this->resolveAlias($hint);

		$eventName === null ? ($this->replacers[$hint][] = $replacer) : ($this->replacers[$hint][$eventName] = $replacer);
	}
public function onReplace ( string $ hint , callable $ replacer , ? string $ eventName = null ) : void { $ hint = $ this -> resolveAlias ( $ hint ) ; $ eventName === null ? ( $ this -> replacers [ $ hint ] [ ] = $ replacer ) : ( $ this -> replacers [ $ hint ] [ $ eventName ] = $ replacer ) ; }
Registers replacers.

@param string      $hint      Type hint
@param callable    $replacer  Instance replacer
@param string|null $eventName Event name
Registers replacers .