InstanceofConfigurator example


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

    /** * Registers a service. * * @param string|null $id The service id, or null to create an anonymous service * @param string|null $class The class of the service, or null when $id is also the class name */
    final public function set(?string $id, string $class = null): ServiceConfigurator
    {
        $defaults = $this->defaults;
        

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

    /** * Registers a service. * * @param string|null $id The service id, or null to create an anonymous service * @param string|null $class The class of the service, or null when $id is also the class name */
    final public function set(?string $id, string $class = null): ServiceConfigurator
    {
        $defaults = $this->defaults;
        
Home | Imprint | This part of the site doesn't use cookies.