PayPal\Core\PayPalConfigManager::getIniPrefix PHP Метод

getIniPrefix() публичный Метод

If $userId is null, returns config keys corresponding to all configured accounts
public getIniPrefix ( string | null $userId = null ) : array | string
$userId string | null
Результат array | string
    public function getIniPrefix($userId = null)
    {
        if ($userId == null) {
            $arr = array();
            foreach ($this->configs as $key => $value) {
                $pos = strpos($key, '.');
                if (strstr($key, "acct")) {
                    $arr[] = substr($key, 0, $pos);
                }
            }
            return array_unique($arr);
        } else {
            $iniPrefix = array_search($userId, $this->configs);
            $pos = strpos($iniPrefix, '.');
            $acct = substr($iniPrefix, 0, $pos);
            return $acct;
        }
    }