0 follower

Final Class Yiisoft\Di\ContainerConfig

InheritanceYiisoft\Di\ContainerConfig
ImplementsYiisoft\Di\ContainerConfigInterface

Container configuration.

Method Details

Hide inherited methods

create() public static method

public static create( ): self

                public static function create(): self
{
    return new self();
}

            
getDefinitions() public method

public getDefinitions( ): array

                public function getDefinitions(): array
{
    return $this->definitions;
}

            
getDelegates() public method

public getDelegates( ): array

                public function getDelegates(): array
{
    return $this->delegates;
}

            
getProviders() public method

public getProviders( ): array

                public function getProviders(): array
{
    return $this->providers;
}

            
getTags() public method

public getTags( ): array

                public function getTags(): array
{
    return $this->tags;
}

            
shouldValidate() public method

public shouldValidate( ): boolean

                public function shouldValidate(): bool
{
    return $this->validate;
}

            
useStrictMode() public method

public useStrictMode( ): boolean

                public function useStrictMode(): bool
{
    return $this->useStrictMode;
}

            
withDefinitions() public method

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;
}

            
withDelegates() public method

public withDelegates( array $delegates ): self
$delegates array

Container delegates. Each delegate is a callable in format function (ContainerInterface $container): ContainerInterface. The container instance returned is used in case a service can't be found in primary container.

                public function withDelegates(array $delegates): self
{
    $new = clone $this;
    $new->delegates = $delegates;
    return $new;
}

            
withProviders() public method

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;
}

            
withStrictMode() public method

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;
}

            
withTags() public method

public withTags( array $tags ): self
$tags array

Tagged service IDs. The structure is ['tagID' => ['service1', 'service2']].

                public function withTags(array $tags): self
{
    $new = clone $this;
    $new->tags = $tags;
    return $new;
}

            
withValidate() public method

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;
}