public function map(ValueObject $value): LanguageCreateData
    {
        if (!$value instanceof LanguageCreateStruct) {
            throw new InvalidArgumentException('value', 'must be an instance of ' . LanguageCreateStruct::class);
        }

        $data = new LanguageCreateData();

        $data->setName($value->name);
        $data->setLanguageCode($value->languageCode);
        $data->setEnabled($value->enabled);

        return $data;
    }
public function map(ValueObject $value): LanguageCreateData
    {
        if (!$value instanceof LanguageCreateStruct) {
            throw new InvalidArgumentException('value', 'must be an instance of ' . LanguageCreateStruct::class);
        }

        $data = new LanguageCreateData();

        $data->setName($value->name);
        $data->setLanguageCode($value->languageCode);
        $data->setEnabled($value->enabled);

        return $data;
    }
public function map ( ValueObject $ value ) : LanguageCreateData { if ( ! $ value instanceof LanguageCreateStruct ) { throw new InvalidArgumentException ( 'value' , 'must be an instance of ' . LanguageCreateStruct :: class ) ; } $ data = new LanguageCreateData ( ) ; $ data -> setName ( $ value -> name ) ; $ data -> setLanguageCode ( $ value -> languageCode ) ; $ data -> setEnabled ( $ value -> enabled ) ; return $ data ; }
Maps given LanguageCreateStruct object to a LanguageCreateData object.

@param LanguageCreateStruct|ValueObject $value

@return LanguageCreateData

@throws InvalidArgumentException
Maps given LanguageCreateStruct object to a LanguageCreateData object .