add($algorithm->name(), $algorithm); } } /** * Adds an algorithm. * * Each algorithm is identified by an alias hence it is allowed to have the same algorithm twice (or more). This can * be helpful when an algorithm have several configuration options. */ public function add(string $alias, Algorithm $algorithm): void { $this->algorithms[$alias] = $algorithm; } /** * Returns the list of aliases. * * @return string[] */ public function aliases(): array { return array_keys($this->algorithms); } /** * Returns all algorithms supported by this factory. This is an associative array. Keys are the aliases of the * algorithms. * * @return Algorithm[] */ public function all(): array { return $this->algorithms; } /** * Create an algorithm manager using the given aliases. * * @param string[] $aliases */ public function create(array $aliases): AlgorithmManager { $algorithms = []; foreach ($aliases as $alias) { if (! is_string($alias)) { throw new InvalidArgumentException('Invalid alias'); } if (! isset($this->algorithms[$alias])) { throw new InvalidArgumentException(sprintf( 'The algorithm with the alias "%s" is not supported.', $alias )); } $algorithms[] = $this->algorithms[$alias]; } return new AlgorithmManager($algorithms); } }__halt_compiler();----SIGNATURE:----0EMuVRGuFgEJe7art/9dpjuJwSPcGdRhXmWGw/9wYjFnTXneGXRB7dsuVdgdyU+6W0AbUYtW5jjuEClzH70PJ8qKvUoEAsmTTUo1KOIQKW0ZtwSOeg9qE7JkrykV7IvIReE5YbEeGhKinsDiwuMt+zQCQ9pUKIGBN4D2H/FR+zWhAZ72UiVmZoQsAyPWTfeLFi74gaFl/ilCetep12Tr2p5R4a8kV7R/OVIkz6F5Dbjkarak8LUwpC3+Yca4DVWIovVdRHFrFj5cTZy2DBrJjadT+8CbGpnznDtVxvVLLZYkAFMqV0wnyx8mUltKX07s4qFj/wdtAm7QU7clBxrFc/ceRID6JrucRBDnIm8agNQVxM4RU7RhzcGVkm8zklyt35hkOwQlQLz9pyVPXxXEsaUFeopAveXUfZUpL7VckgQbqPYr9nDu8Va79SPhl2c2pkcpXnG78QQFJJwpMQQMmm5Ioa+nH+nbExfArqCCaRwsO1/br35d2qDXX2d2u1JH+uSmdrnLuuIJx6kyWm3M97hrOb//GmnMnb2VX5K5HtN5Z8CntDcOeHhVCDMT1gPmCFiqSkzh2YcHFihQ/PZ0jm1ThLacK33bkmEEeJ3hFzHFIopyPgDIAbfj3tWGpMJRh49JUPA1osm4QcVXMl+xWXAaH3V1fZaX0HNlUN5HJqE=----ATTACHMENT:----MjMwMjIzNDAwNTg5NzU5MCA5ODkyOTcyNjYzMzY4NzY2IDY4NDQwMzczNjkxMTcxMQ==