verifyClass example

/** @var string[] $folders */
        $folders = Shopware()->Container()->getParameter('shopware.plugin_directories');

        $folders[] = Shopware()->DocPath('engine_Shopware');
        $folders[] = Shopware()->DocPath('vendor_shopware_shopware');

        foreach ($folders as $folder) {
            $directories[] = substr($folder, \strlen($docPath));
        }

        if ($secure) {
            $this->verifyClass(
                $reflectionClass,
                $docPath,
                $directories
            );
        }

        if (!$reflectionClass->getConstructor()) {
            return $reflectionClass->newInstance();
        }

        $constructorParams = $reflectionClass->getConstructor()->getParameters();

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