public function addCharacters($chars)
    {
        if (WF::is_array_like($chars))
        {
            foreach ($chars as $char)
            {
                if (!is_string($char))
                    throw new InvalidArgumentException("Invalid type: " . WF::str($chars));
                $this->characters[$char] = true;
            }
        }
        elseif (is_string($chars))
        {
            for ($i = 0; $i < mb_strlen($chars); ++$i)
                $this->characters[mb_substr($chars, $i, 1)] = true;
        }
        else
        {
            throw new InvalidArgumentException("Invalid type: " . WF::str($chars));
        }
        return $this;
    }
public function addCharacters($chars)
    {
        if (WF::is_array_like($chars))
        {
            foreach ($chars as $char)
            {
                if (!is_string($char))
                    throw new InvalidArgumentException("Invalid type: " . WF::str($chars));
                $this->characters[$char] = true;
            }
        }
        elseif (is_string($chars))
        {
            for ($i = 0; $i < mb_strlen($chars); ++$i)
                $this->characters[mb_substr($chars, $i, 1)] = true;
        }
        else
        {
            throw new InvalidArgumentException("Invalid type: " . WF::str($chars));
        }
        return $this;
    }
public function addCharacters ( $ chars ) { if ( WF :: is_array_like ( $ chars ) ) { foreach ( $ chars as $ char ) { if ( ! is_string ( $ char ) ) throw new InvalidArgumentException ( "Invalid type: " . WF :: str ( $ chars ) ) ; $ this -> characters [ $ char ] = true ; } } elseif ( is_string ( $ chars ) ) { for ( $ i = 0 ; $ i < mb_strlen ( $ chars ) ; ++ $ i ) $ this -> characters [ mb_substr ( $ chars , $ i , 1 ) ] = true ; } else { throw new InvalidArgumentException ( "Invalid type: " . WF :: str ( $ chars ) ) ; } return $ this ; }
Add one or more characters to the list of eligible characters
@param string|array $chars The characters to add
@return Wedeto\Auth\PasswordGenerator Provides fluent interface
Add one or more characters to the list of eligible characters