src/Shared/Message/Mapping/MappingTrait.php
public static function setMappings(
        array $messages,
        /*# bool */ $manual = true
    ) {
        $class = get_called_class();

        if ($manual) {
            // set default
            static::$messages = $messages;

            // status changed
            self::setStatus();
        } else {
            // set cache
            self::$mappings[$class] = array_replace(
                $class::getMappings(),
                $messages
            );
        }
    }
public static function setMappings(
        array $messages,
        /*# bool */ $manual = true
    ) {
        $class = get_called_class();

        if ($manual) {
            // set default
            static::$messages = $messages;

            // status changed
            self::setStatus();
        } else {
            // set cache
            self::$mappings[$class] = array_replace(
                $class::getMappings(),
                $messages
            );
        }
    }
public static function setMappings ( array $ messages , /*# bool */ $ manual = true ) { $ class = get_called_class ( ) ; if ( $ manual ) { // set default static :: $ messages = $ messages ; // status changed self :: setStatus ( ) ; } else { // set cache self :: $ mappings [ $ class ] = array_replace ( $ class :: getMappings ( ) , $ messages ) ; } }
Reset current message class' code to message mappings cache

```php
MyMessage::setMappings([
MyMessage::MSG_HELLO => 'Hello %s'
]);
```

@param  array $messages messages mapping array
@param  bool $manual manually, not auto load from $loader
@access public
@api
Reset current message class code to message mappings cache