public function putMetaData($key, $value = null): void
    {
        $meta = $this->getAttribute('meta');

        if (\is_array($key)) {
            foreach ($key as $name => $value) {
                $meta->put($name, $value);
            }
        } else {
            $meta->put($key, $value);
        }

        $this->setMetaAttribute($meta);
    }
public function putMetaData($key, $value = null): void
    {
        $meta = $this->getAttribute('meta');

        if (\is_array($key)) {
            foreach ($key as $name => $value) {
                $meta->put($name, $value);
            }
        } else {
            $meta->put($key, $value);
        }

        $this->setMetaAttribute($meta);
    }
public function putMetaData ( $ key , $ value = null ) : void { $ meta = $ this -> getAttribute ( 'meta' ) ; if ( \ is_array ( $ key ) ) { foreach ( $ key as $ name => $ value ) { $ meta -> put ( $ name , $ value ) ; } } else { $ meta -> put ( $ key , $ value ) ; } $ this -> setMetaAttribute ( $ meta ) ; }
Put meta data.

@param  string|array  $key
@param  mixed  $value

@return void
Put meta data .