DecorateTrait

trait DecorateTrait

Methods

$this decorate(null|string $id, null|string $renamedId = null, int $priority)

Sets the service that this service is decorating.

Details

final $this decorate(null|string $id, null|string $renamedId = null, int $priority)

Sets the service that this service is decorating.

Parameters

null|string $id The decorated service id, use null to remove decoration
null|string $renamedId The new decorated service id
int $priority The priority of decoration

Return Value

$this

Exceptions

InvalidArgumentException in case the decorated service id and the new decorated service id are equals