4 require_once
'Services/User/exceptions/class.ilUserException.php';
30 switch (strtolower(
$key)) {
31 case 'default_password_encoder':
55 if ($encoder->isSupportedByRuntime()) {
56 $this->encoders[$encoder->getName()] = $encoder;
91 $this->encoders =
array();
92 foreach ($encoders as $encoder) {
94 throw new ilUserException(sprintf(
'One of the passed encoders is not valid: %s.', json_encode($encoder)));
96 $this->encoders[$encoder->getName()] = $encoder;
116 if (!isset($this->encoders[
$name])) {
117 if (!$get_default_on_mismatch) {
118 throw new ilUserException(sprintf(
'The encoder "%s" was not configured.', $name));
120 throw new ilUserException(
'No default encoder specified, fallback not possible.');
122 throw new ilUserException(
"No default encoder found for name: '{$this->getDefaultEncoder()}'.");
128 return $this->encoders[
$name];
Class for user related exception handling in ILIAS.
__construct(array $config=array())
setEncoders(array $encoders)
initEncoders(array $config)
Create styles array
The data for the language used.
getSupportedEncoderNames()
setDefaultEncoder($default_encoder)
getEncoderByName($name, $get_default_on_mismatch=false)