WordPress\AiClientDependencies\Http\Discovery\Strategy

PuliBetaStrategy::getPuliFactoryprivate staticWP 1.0

Method of the class: PuliBetaStrategy{}

No Hooks.

Returns

GeneratedPuliFactory.

Usage

$result = PuliBetaStrategy::getPuliFactory();

PuliBetaStrategy::getPuliFactory() code WP 7.0

private static function getPuliFactory()
{
    if (null === self::$puliFactory) {
        if (!defined('PULI_FACTORY_CLASS')) {
            throw new PuliUnavailableException('Puli Factory is not available');
        }
        $puliFactoryClass = PULI_FACTORY_CLASS;
        if (!ClassDiscovery::safeClassExists($puliFactoryClass)) {
            throw new PuliUnavailableException('Puli Factory class does not exist');
        }
        self::$puliFactory = new $puliFactoryClass();
    }
    return self::$puliFactory;
}