CoreFiles by mySites.guru
KeyAnalyzerManager.php36 lines, 743 bytes, from Joomla_5.1.0-beta1-Beta-Full_Package.zip
Raw History Compare with 5.0.0-beta3
md5
971519abca7116680dda48d3017d8c5f
sha1
cb2446640f569779012bbcb360fef6a39aacb492
sha256
342ef47c5930d032aad0c7ca06919a6d007a1c9753972f1c7fb558c01f261401
<?php

declare(strict_types=1);

namespace Jose\Component\KeyManagement\Analyzer;

use Jose\Component\Core\JWK;

class KeyAnalyzerManager
{
    /**
     * @var KeyAnalyzer[]
     */
    private array $analyzers = [];

    /**
     * Adds a Key Analyzer to the manager.
     */
    public function add(KeyAnalyzer $analyzer): void
    {
        $this->analyzers[] = $analyzer;
    }

    /**
     * This method will analyze the JWK object using all analyzers. It returns a message bag that may contains messages.
     */
    public function analyze(JWK $jwk): MessageBag
    {
        $bag = new MessageBag();
        foreach ($this->analyzers as $analyzer) {
            $analyzer->analyze($jwk, $bag);
        }

        return $bag;
    }
}

The same content is in 135 releases, Joomla 5.1.0-beta1 to 6.2.1. See them all, or every version of this file.