FileUpload\FileUpload::prepareMessages PHP Méthode

prepareMessages() private méthode

Converts $messages array into a hash with strings as keys This allows us to work with the keys and values as if it was a hash Which it really should be but, well, arrays in PHP, am I right?
private prepareMessages ( )
    private function prepareMessages()
    {
        $prepared = array();
        foreach ($this->messages as $key => $msg) {
            $prepared[(string) $key] = $msg;
        }
        $this->messages = $prepared;
    }