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 self create ( )

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

            
getDefinitions() public method

public array getDefinitions ( )

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

            
getDelegates() public method

public array getDelegates ( )

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

            
getProviders() public method

public array getProviders ( )

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

            
getTags() public method

public array getTags ( )

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

            
shouldValidate() public method

public boolean shouldValidate ( )

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

            
useStrictMode() public method

public boolean useStrictMode ( )

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

            
withDefinitions() public method

public self withDefinitions ( array $definitions )
$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 self withDelegates ( array $delegates )
$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 self withProviders ( array $providers )
$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 self withStrictMode ( boolean $useStrictMode true )
$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 self withTags ( array $tags )
$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 self withValidate ( boolean $validate true )
$validate boolean

Whether definitions should be validated immediately.

                public function withValidate(bool $validate = true): self
{
    $new = clone $this;
    $new->validate = $validate;
    return $new;
}