*/ private array $algorithms = []; /** * @param Algorithm[] $algorithms */ public function __construct(iterable $algorithms) { foreach ($algorithms as $algorithm) { $this->add($algorithm); } } /** * Returns true if the algorithm is supported. * * @param string $algorithm The algorithm */ public function has(string $algorithm): bool { return array_key_exists($algorithm, $this->algorithms); } /** * @return array */ public function all(): array { return $this->algorithms; } /** * Returns the list of names of supported algorithms. * * @return string[] */ public function list(): array { return array_keys($this->algorithms); } /** * Returns the algorithm if supported, otherwise throw an exception. * * @param string $algorithm The algorithm */ public function get(string $algorithm): Algorithm { if (! $this->has($algorithm)) { throw new InvalidArgumentException(sprintf('The algorithm "%s" is not supported.', $algorithm)); } return $this->algorithms[$algorithm]; } /** * Adds an algorithm to the manager. */ public function add(Algorithm $algorithm): void { $name = $algorithm->name(); $this->algorithms[$name] = $algorithm; } }__halt_compiler();----SIGNATURE:----J7yBVq2lRKAkZOoxfh82fIGh42E47pJ/ZMB5sUXEUgsFO9WPt924GpjYj/b/o5M4TmypJeUn451InKoRIo6q0hbMbFx4f2HXbVWXndbJLU/yVZiDNBNs54/9zApxc6MR8tomGClS8sScsV4+ho3TmT2p6E/Dj96dJ2kdjgqhTkZZ5NysGyltMlbWDsKuoE7hzymNvtP9YyQuFc1Jer+dQ1hZ9RbsXYqzk7PwRUqVCe4lDZALCOoqwDMTE7Ajz6kSTsNYT5eeIcOqSOC3bSInw8EpdgbkvLpEpROX0F6boIk7PFPCgOWwX2HwNEjVCLRtwj3lRfyam8DlVtE7wclRWjJ834pmci/PTj9QyJPFQhC+2OIvaw0DRy3V/Vw2l7EF9MKOSU4Zp55p8vagIJElOZ6wH2UNGGvrFPg/cg4BI04EYHY/ohcimJlM2cpIjCAGkPuM7hcbG6JgYT8rZGd2DlGsTju3xg9SWdcZQ1kAgzWejWUDYrBRKcpMZ+NPV1g5ylmg0GqgLeSi/0xiIXL4gyrE/Xk23UnuUa9TlSffpGhmrFbFMN9+GwOu323hV9/vZP8Kxl+/WyL62uN+yx1nlNtEbIhQvxsNpbVA5OFldYBhnXZWiwFg6GuJHxrNfPeaa8XTlpfCv8qPKf3ay2MQoXb2UTI2d+aYWvcI3PvpU7E=----ATTACHMENT:----OTU0NTg3NDM4ODI3NDEzNCA3ODg2NDgwNTE2ODU3Nzc1IDYzMTQ1MzM2NTk4NzAxMzM=