Final Class Yiisoft\Di\ContainerConfig
| Inheritance | Yiisoft\Di\ContainerConfig |
|---|---|
| Implements | Yiisoft\Di\ContainerConfigInterface |
Container configuration.
Public Methods
Method Details
| public getDefinitions( ): array |
public function getDefinitions(): array
{
return $this->definitions;
}
| public shouldValidate( ): boolean |
public function shouldValidate(): bool
{
return $this->validate;
}
| public useStrictMode( ): boolean |
public function useStrictMode(): bool
{
return $this->useStrictMode;
}
| public withDefinitions( array $definitions ): self | ||
| $definitions | array |
Definitions to put into container. |
public function withDefinitions(array $definitions): self
{
$new = clone $this;
$new->definitions = $definitions;
return $new;
}
| public withDelegates( array $delegates ): self | ||
| $delegates | array |
Container delegates. Each delegate is a callable in format
|
public function withDelegates(array $delegates): self
{
$new = clone $this;
$new->delegates = $delegates;
return $new;
}
| public withProviders( array $providers ): self | ||
| $providers | array |
Service providers to get definitions from. |
public function withProviders(array $providers): self
{
$new = clone $this;
$new->providers = $providers;
return $new;
}
| public withStrictMode( boolean $useStrictMode = true ): self | ||
| $useStrictMode | boolean |
If the automatic addition of definition when class exists and can be resolved is disabled. |
public function withStrictMode(bool $useStrictMode = true): self
{
$new = clone $this;
$new->useStrictMode = $useStrictMode;
return $new;
}
| public withTags( array $tags ): self | ||
| $tags | array |
Tagged service IDs. The structure is |
public function withTags(array $tags): self
{
$new = clone $this;
$new->tags = $tags;
return $new;
}
| public withValidate( boolean $validate = true ): self | ||
| $validate | boolean |
Whether definitions should be validated immediately. |
public function withValidate(bool $validate = true): self
{
$new = clone $this;
$new->validate = $validate;
return $new;
}
Signup or Login in order to comment.