Return information about specified certificate

@param   string $type
@throws  \RuntimeException
@return  array
773918
public function getCert(string $type): array
    {
        $type = mb_strtolower($type);
        $this->throwIfNotInArray($type, self::CERTS);
        return $this->_certs[$type] ?? [];
    }
1371999
public static function get($key, $type = 'ses')
    {
        $sessionData = $GLOBALS['TSFE']->fe_user->getKey(self::isType($type), $key);

        return unserialize($sessionData);
    }
563591
public static function getTypeDescription(?string $type): ?string
    {
        $descriptions = self::typeDescriptions();
        if (isset($descriptions[$type])) {
            return $descriptions[$type];
        }

        return $type;
    }
260648
public function getClassForType(string $type):?string
    {
        if (isset($this->typeMap[$type])) {
            return $this->typeMap[$type];
        }

        return null;
    }
1333932
public function paramBroker($type): ParamBroker
    {
        if (isset($this->paramBrokers[$type])) {
            return $this->paramBrokers[$type];
        }

        throw new \RuntimeException('No param broker found for ' . $type);
    }
715162
public function getRegister($type, array $args = [])
    {
        $chain = clone $this->chain;
        while ($chain) {
            /** @var TypeResolverInterface $resolver */
            $resolver = $chain->current();
            try {
                $register = $resolver->getRegister($type, $args);
                if ($register instanceof RegisterInterface) {
                    return $register;
                }
            } catch (\Exception $e) {
                if (!$this->getFlagIgnoreException()) {
                    throw new Exception\RuntimeException($e->getMessage(), $e->getCode(), $e);
                }
            }
            $chain->next();
        }

        $errMsg = sprintf('Register for type %s not found', $type);
        throw new Exception\ResultNotFoundException($errMsg);
    }
745217
protected function returnData($type)
    {
        $data = ['result' => $type];
        if ( $this->hasPhoto ){
            $data['photos'] = $this->repo->files;
        }
        if ( $this->hasFile ) {
            $data['files'] = $this->repo->files;
        }
        return $data;
    }
846300
private static function getFactory(string $type)
    {
        if (!empty(self::$factories[$type])) {
            return self::$factories[$type];
        }

        if (!empty(self::$factory)) {
            return self::$factories[$type] = self::$factory;
        }

        foreach (self::$strategies as $className) {
            if (is_array($className) && isset($className[$type])) {
                $className = $className[$type];

                if (class_exists($className)) {
                    return self::$factories[$type] = new $className();
                }

                continue;
            }

            if (!class_exists($className)) {
                continue;
            }

            if (strpos($className, __NAMESPACE__) === 0 && !$className::isInstalled()) {
                continue;
            }

            return self::$factories[$type] = self::$factory = new $className();
        }

        throw new RuntimeException('No PSR-7 library detected');
    }
652801
private function getMapping($type, $file)
    {
        if (isset($this->mappings[$type])) {
            // Set to array cache to prevent multiple gets/parses.
            return $this->mappings[$type];
        }

        $contents = Yaml::parse(file_get_contents($file));
        if (!isset($contents[$type])) {
            throw new RuntimeException(sprintf('The YAML file must be keyed with the entity type "%s" but was not found.', $type));
        }
        return $this->mappings[$type] = $this->setDefaults($contents[$type]);
    }
1122222
private static function getClass($type)
    {
        if (!\array_key_exists($type, self::$types)) {
            throw new \RuntimeException('invalid type');
        }

        return self::$types[$type];
    }
550915
public function getString($type = self::RFC_4314)
    {
        $acl = strval($this);

        if ($type == self::RFC_2086) {
            foreach ($this->_virtual as $key => $val) {
                $acl = str_replace($val, '', $acl, $count);
                if ($count) {
                    $acl .= $key;
                }
            }
        }

        return $acl;
    }
319087
public function getValidatingCertificates() : array
    {
        $ret = [];
        foreach ($this->certificates as $cert) {
            /* Construct a PEM formatted certificate */
            $pemCert = "-----BEGIN CERTIFICATE-----\n".
                chunk_split($cert, 64).
                "-----END CERTIFICATE-----\n";

            /* Extract the public key from the certificate for validation. */
            $key = new XMLSecurityKey(XMLSecurityKey::RSA_SHA256, ['type'=>'public']);
            $key->loadKey($pemCert);

            try {
                /* Check the signature. */
                if ($this->validate($key)) {
                    $ret[] = $cert;
                }
            } catch (\Exception $e) {
                /* This certificate does not sign this element. */
            }
        }

        return $ret;
    }
67843
public static function getInstance($type = 'default') {
		static $aclm = [];
		if (!isset($aclm[ $type ])) {
			$manager = new AclResourceManager();
			@fire('rbac\init' . ucfirst($type) . 'Manager', $manager);
			$aclm[ $type ] = $manager;
		}

		return $aclm[ $type ];
	}
1174150
public function getChecksByType(string $type): array
    {
        return isset($this->checks[$type]) ? $this->checks[$type] : array();
    }
474232
public function getSignatureAlgorithm($type)
    {
        if (!isset($this->signatureAlgorithms[$type])) {
            throw new \RuntimeException('Algorithm not configured: ' . $type);
        }
        return $this->signatureAlgorithms[$type];
    }
230373
public function getTokenName($type)
    {
        if (!isset($this->tokenNames[$type])) {
            throw new \RuntimeException(
                "Unknown token $type."
            );
        }

        return $this->tokenNames[$type];
    }
1124952
public function fromFile($filePath)
    {
        $pemString = file_get_contents($filePath);

        if (!$pemString) {
            throw new RuntimeException("Unable to read file at path '$filePath'.");
        }

        try {
            $certificate = $this->fromString($pemString);
        } catch (Exception $e) {
            throw new RuntimeException("File at '$filePath' does not contain a valid certificate.", 0, $e);
        }
        return $certificate;
    }