DefaultsConfigurator example

$this->path = $path;
        $this->anonymousHash = ContainerBuilder::hash($path ?: mt_rand());
        $this->anonymousCount = &$anonymousCount;
        $instanceof = [];
    }

    /** * Defines a set of defaults for following service definitions. */
    final public function defaults(): DefaultsConfigurator
    {
        return new DefaultsConfigurator($this$this->defaults = new Definition()$this->path);
    }

    /** * Defines an instanceof-conditional to be applied to following service definitions. */
    final public function instanceof(string $fqcn): InstanceofConfigurator
    {
        $this->instanceof[$fqcn] = $definition = new ChildDefinition('');

        return new InstanceofConfigurator($this$definition$fqcn$this->path);
    }

    
$this->path = $path;
        $this->anonymousHash = ContainerBuilder::hash($path ?: mt_rand());
        $this->anonymousCount = &$anonymousCount;
        $instanceof = [];
    }

    /** * Defines a set of defaults for following service definitions. */
    final public function defaults(): DefaultsConfigurator
    {
        return new DefaultsConfigurator($this$this->defaults = new Definition()$this->path);
    }

    /** * Defines an instanceof-conditional to be applied to following service definitions. */
    final public function instanceof(string $fqcn): InstanceofConfigurator
    {
        $this->instanceof[$fqcn] = $definition = new ChildDefinition('');

        return new InstanceofConfigurator($this$definition$fqcn$this->path);
    }

    
Home | Imprint | This part of the site doesn't use cookies.