@param string $saslHandle

@return static
501779
public static function getByHandle($saslHandle)
    {
        $db = Loader::db();
        $r = $db->GetRow('select saslHandle, saslIsActive, pkgID, saslName from SystemAntispamLibraries where saslHandle = ?', array($saslHandle));
        if (is_array($r) && $r['saslHandle']) {
            $sc = new static();
            $sc->setPropertiesFromArray($r);

            return $sc;
        }
    }
762679
public function createStack($handlers): Stack
    {
        if (!is_array($handlers)) {
            $handlers = [$handlers];
        }
        return new Stack(
            $handlers,
            $this->handlerResolver
        );
    }
1367371
public function forLocale($locale, $fallbacks = null)
    {
        $fork = new static(
            $this->coreFormatter,
            $this->extractor,
            $this->typeProvider,
            $this->textProvider,
            $this->_extensions
        );

        if ($fallbacks) {
            $fork->setFallbacks((array)$fallbacks);
        }

        return $fork->setLocale($locale);
    }
1244089
protected function curlExec($curlHandle): string
    {
        $this->headerLinesMap[(int) $curlHandle] = [];

        $result = curl_exec($curlHandle);
        if (false === $result) {
            $result = '';
        }

        return $result;
    }
596146
public static function getBySlug($sSlug): ?Component
    {
        $aComponents = static::available();

        foreach ($aComponents as $oComponent) {
            if ($oComponent->slug === $sSlug) {
                return $oComponent;
            }
        }

        return null;
    }
142804
public static function EnableSSL () {
		return static::LasyClassVarConstAccessCallback('enable_ssl', function () {
			return (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] === 'https') || (isset($_SERVER['HTTPS']) && !empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off');
		});
	}
847547
protected function pushHandler($handler, $formatter = true)
    {
        if ($formatter == false) {
            return $this->monolog->pushHandler($handler);
        }

        $this->monolog->pushHandler($handler);
        $handler->setFormatter($this->getDefaultFormatter());

        return $this;
    }
557054
public function createWrapper($namespace = null) {
		if (! isset($this->_wrappers[$namespace])) {
			$wrapper  = new Wrapper($this->getBackend(), $namespace);
			$lifetime = $this->getDefaultLifetime();
			
			if ($lifetime !== null) {
				$wrapper->setDefaultLifetime($lifetime);
			}
			
			$this->_wrappers[$namespace] = $wrapper;
		}
		
		return $this->_wrappers[$namespace];
	}
844818
public function withSSL(int $mode = self::SSL_AUTO): self
    {
        $this->ssl = $mode;

        return $this;
    }
39570
private function getCurlHandle($url)
    {
        if ($curl = curl_init($url)) {
            curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 15);
            curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
            curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);

            if ($this->is_https && $this->verify_ssl_peer) {
                curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, true);
                curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 2);

                if ($this->custom_ca_file) {
                    curl_setopt($curl, CURLOPT_CAINFO, $this->custom_ca_file);
                }
            } else {
                curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
                curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);
            }

            return $curl;
        } else {
            throw new \RuntimeException("Can't create curl handle");
        }
    }
319040
public function staticHandle($class): StaticHandle
    {
        if ($class instanceof StaticHandle) {
            return $class;
        }

        if ($class instanceof Handle) {
            $class = $class->class();
        } elseif ($class instanceof Mock) {
            $class = new ReflectionClass($class);
        } elseif (is_string($class)) {
            try {
                $class = new ReflectionClass($class);
            } catch (ReflectionException $e) {
                throw new NonMockClassException($class, $e);
            }
        } elseif (!$class instanceof ReflectionClass) {
            throw new InvalidMockClassException($class);
        }

        if (!$class->isSubclassOf(Mock::class)) {
            throw new NonMockClassException($class->getName());
        }

        $handleProperty = $class->getProperty('_staticHandle');
        $handleProperty->setAccessible(true);

        if ($handle = $handleProperty->getValue(null)) {
            return $handle;
        }

        $handle = new StaticHandle(
            $class,
            (object) [
                'defaultAnswerCallback' =>
                    [StubData::class, 'forwardsAnswerCallback'],
                'stubs' => (object) [],
                'isRecording' => true,
            ],
            $this->stubFactory,
            $this->stubVerifierFactory,
            $this->emptyValueFactory,
            $this->assertionRenderer,
            $this->assertionRecorder,
            $this->invoker
        );

        $handleProperty->setValue(null, $handle);

        return $handle;
    }
1131331
public static function getHandler($level = null)
    {
        if (empty($level)) {
            $level = static::DEFAULT_LEVEL;
        }

        if (empty(static::$handler)) {
            static::setHandler($level);
        }
        return static::$handler;
    }
1239874
public static function createNewAccessToken(
        int $ttl,
        TokenOwnerInterface $owner = null,
        Client $client = null,
        $scopes = null
    ): AccessToken {
        return static::createNew($ttl, $owner, $client, $scopes);
    }
512509
protected function getHandle()
	{
		if (!isset(self::$handle))
		{
			self::$handle = $this->getNewHandle();
		}

		curl_setopt(self::$handle, CURLOPT_SSL_VERIFYPEER, $this->sslVerifyPeer);
		curl_setopt(self::$handle, CURLOPT_TIMEOUT,        $this->timeout);

		return self::$handle;
	}
773396
static function factory($type)
    {
        switch (strtolower($type)) {
            case 'anonymous':
                $filename  = dirname(__FILE__) . '/SASL/Anonymous.php';
                $classname = 'Auth_SASL_Anonymous';
                break;

            case 'login':
                $filename  = dirname(__FILE__) . '/SASL/Login.php';
                $classname = 'Auth_SASL_Login';
                break;

            case 'plain':
                $filename  = dirname(__FILE__) . '/SASL/Plain.php';
                $classname = 'Auth_SASL_Plain';
                break;

            case 'external':
                $filename  = dirname(__FILE__) . '/SASL/External.php';
                $classname = 'Auth_SASL_External';
                break;

            case 'crammd5':
                // $msg = 'Deprecated mechanism name. Use IANA-registered name: CRAM-MD5.';
                // trigger_error($msg, E_USER_DEPRECATED);
            case 'cram-md5':
                $filename  = dirname(__FILE__) . '/SASL/CramMD5.php';
                $classname = 'Auth_SASL_CramMD5';
                break;

            case 'digestmd5':
                // $msg = 'Deprecated mechanism name. Use IANA-registered name: DIGEST-MD5.';
                // trigger_error($msg, E_USER_DEPRECATED);
            case 'digest-md5':
                // $msg = 'DIGEST-MD5 is a deprecated SASL mechanism as per RFC-6331. Using it could be a security risk.';
                // trigger_error($msg, E_USER_NOTICE);
                $filename  = dirname(__FILE__) . '/SASL/DigestMD5.php';
                $classname = 'Auth_SASL_DigestMD5';
                break;

            default:
                $scram = '/^SCRAM-(.{1,9})$/i';
                $matches = [];
                if (preg_match($scram, $type, $matches))
                {
                    $hash = $matches[1];
                    $filename = dirname(__FILE__) .'/SASL/SCRAM.php';
                    $classname = 'Auth_SASL_SCRAM';
                    $parameter = $hash;
                    break;
                }
                throw new InvalidArgumentException('Invalid SASL mechanism type');
                break;
        }

        require_once $filename;
        if (isset($parameter)) {
            $obj = new $classname($parameter);
        } else {
            $obj = new $classname();
        }

        return $obj;
    }
1023858
public function sniffCookie(\Nails\Common\Factory\Locale &$oLocale)
    {
        $this->setFromString(
            $oLocale,
            $this->oInput->get(static::COOKIE_NAME) ?? null
        );

        return $this;
    }
8194
public function generateFeed($targetHandle)
    {
        $this->executeLocked(function () use ($targetHandle) {
            $this->writer->write($targetHandle);
            $this->touchFeedGenerateDate();
        });
        return $this;
    }