startClass example

$this->targetDirRegex = '#(^|file://|[:;, \|\r\n])'.preg_quote($dir[0], '#').$regex.'#';
            }
        }

        $proxyClasses = $this->inlineFactories ? $this->generateProxyClasses() : null;

        if ($options['preload_classes']) {
            $this->preload = array_combine($options['preload_classes']$options['preload_classes']);
        }

        $code =
            $this->startClass($options['class']$baseClass).
            $this->addServices($services).
            $this->addDeprecatedAliases().
            $this->addDefaultParametersMethod()
        ;

        $proxyClasses = $proxyClasses ?? $this->generateProxyClasses();

        if ($this->addGetService) {
            $code = preg_replace(
                "/(\r?\n\r?\n public function __construct.+?\\{\r?\n)/s",
                "\n private \$getService;$1 \$this->getService = \\Closure::fromCallable([\$this, 'getService']);\n",
                

        }

        $proxyClasses = $this->inlineFactories ? $this->generateProxyClasses() : null;

        if ($options['preload_classes']) {
            $this->preload = array_combine($options['preload_classes']$options['preload_classes']);
        }

        $code = $this->addDefaultParametersMethod();
        $code =
            $this->startClass($options['class']$baseClass$this->inlineFactories && $proxyClasses).
            $this->addServices($services).
            $this->addDeprecatedAliases().
            $code
        ;

        $proxyClasses ??= $this->generateProxyClasses();

        if ($this->addGetService) {
            $code = preg_replace(
                "/\r?\n\r?\n public function __construct.+?\\{\r?\n/s",
                "\n protected \Closure \$getService;$0",
                

        }

        $proxyClasses = $this->inlineFactories ? $this->generateProxyClasses() : null;

        if ($options['preload_classes']) {
            $this->preload = array_combine($options['preload_classes']$options['preload_classes']);
        }

        $code = $this->addDefaultParametersMethod();
        $code =
            $this->startClass($options['class']$baseClass$this->inlineFactories && $proxyClasses).
            $this->addServices($services).
            $this->addDeprecatedAliases().
            $code
        ;

        $proxyClasses ??= $this->generateProxyClasses();

        if ($this->addGetService) {
            $code = preg_replace(
                "/\r?\n\r?\n public function __construct.+?\\{\r?\n/s",
                "\n protected \Closure \$getService;$0",
                
Home | Imprint | This part of the site doesn't use cookies.