0 follower

Final Class Yiisoft\Yii\Debug\Collector\ContainerProxyConfig

InheritanceYiisoft\Yii\Debug\Collector\ContainerProxyConfig

Method Details

Hide inherited methods

__construct() public method

public mixed __construct ( boolean $active false, array $decoratedServices = [], \Psr\EventDispatcher\EventDispatcherInterface|null $dispatcher null, Yiisoft\Yii\Debug\Collector\ServiceCollector|null $collector null, string|null $proxyCachePath null, integer $logLevel ContainerInterfaceProxy::LOG_NOTHING )
$active boolean
$decoratedServices array
$dispatcher \Psr\EventDispatcher\EventDispatcherInterface|null
$collector Yiisoft\Yii\Debug\Collector\ServiceCollector|null
$proxyCachePath string|null
$logLevel integer

                public function __construct(
    private bool $active = false,
    private array $decoratedServices = [],
    private ?EventDispatcherInterface $dispatcher = null,
    private ?ServiceCollector $collector = null,
    private ?string $proxyCachePath = null,
    private int $logLevel = ContainerInterfaceProxy::LOG_NOTHING,
) {
}

            
activate() public method

public self activate ( )

                public function activate(): self
{
    $config = clone $this;
    $config->active = true;
    return $config;
}

            
getCollector() public method

public Yiisoft\Yii\Debug\Collector\ServiceCollector|null getCollector ( )

                public function getCollector(): ?ServiceCollector
{
    return $this->collector;
}

            
getDecoratedServiceConfig() public method

public mixed getDecoratedServiceConfig ( string $service )
$service string

                public function getDecoratedServiceConfig(string $service): mixed
{
    return $this->decoratedServices[$service];
}

            
getDecoratedServices() public method

public array getDecoratedServices ( )

                public function getDecoratedServices(): array
{
    return $this->decoratedServices;
}

            
getDispatcher() public method

public \Psr\EventDispatcher\EventDispatcherInterface|null getDispatcher ( )

                public function getDispatcher(): ?EventDispatcherInterface
{
    return $this->dispatcher;
}

            
getIsActive() public method

public boolean getIsActive ( )

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

            
getLogLevel() public method

public integer getLogLevel ( )

                public function getLogLevel(): int
{
    return $this->logLevel;
}

            
getProxyCachePath() public method

public string|null getProxyCachePath ( )

                public function getProxyCachePath(): ?string
{
    return $this->proxyCachePath;
}

            
hasCollector() public method

public boolean hasCollector ( )

                public function hasCollector(): bool
{
    return $this->collector !== null;
}

            
hasDecoratedService() public method

public boolean hasDecoratedService ( string $service )
$service string

                public function hasDecoratedService(string $service): bool
{
    return isset($this->decoratedServices[$service]) || in_array($service, $this->decoratedServices, true);
}

            
hasDecoratedServiceArrayConfig() public method

public boolean hasDecoratedServiceArrayConfig ( string $service )
$service string

                public function hasDecoratedServiceArrayConfig(string $service): bool
{
    return isset($this->decoratedServices[$service]) && is_array($this->decoratedServices[$service]);
}

            
hasDecoratedServiceArrayConfigWithStringKeys() public method

public boolean hasDecoratedServiceArrayConfigWithStringKeys ( string $service )
$service string

                public function hasDecoratedServiceArrayConfigWithStringKeys(string $service): bool
{
    return $this->hasDecoratedServiceArrayConfig($service) && !isset($this->decoratedServices[$service][0]);
}

            
hasDecoratedServiceCallableConfig() public method

public boolean hasDecoratedServiceCallableConfig ( string $service )
$service string

                public function hasDecoratedServiceCallableConfig(string $service): bool
{
    return isset($this->decoratedServices[$service]) && is_callable($this->decoratedServices[$service]);
}

            
hasDispatcher() public method

public boolean hasDispatcher ( )

                public function hasDispatcher(): bool
{
    return $this->dispatcher !== null;
}

            
withCollector() public method

public self withCollector ( Yiisoft\Yii\Debug\Collector\ServiceCollector $collector )
$collector Yiisoft\Yii\Debug\Collector\ServiceCollector

                public function withCollector(ServiceCollector $collector): self
{
    $config = clone $this;
    $config->collector = $collector;
    return $config;
}

            
withDecoratedServices() public method

public self withDecoratedServices ( array $decoratedServices )
$decoratedServices array

                public function withDecoratedServices(array $decoratedServices): self
{
    $config = clone $this;
    $config->decoratedServices = array_merge($this->decoratedServices, $decoratedServices);
    return $config;
}

            
withDispatcher() public method

public self withDispatcher ( \Psr\EventDispatcher\EventDispatcherInterface $dispatcher )
$dispatcher \Psr\EventDispatcher\EventDispatcherInterface

                public function withDispatcher(EventDispatcherInterface $dispatcher): self
{
    $config = clone $this;
    $config->dispatcher = $dispatcher;
    return $config;
}

            
withLogLevel() public method

public self withLogLevel ( integer $logLevel )
$logLevel integer

                public function withLogLevel(int $logLevel): self
{
    $config = clone $this;
    $config->logLevel = $logLevel;
    return $config;
}

            
withProxyCachePath() public method

public self withProxyCachePath ( string $proxyCachePath )
$proxyCachePath string

                public function withProxyCachePath(string $proxyCachePath): self
{
    $config = clone $this;
    $config->proxyCachePath = $proxyCachePath;
    return $config;
}