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

        $data = new PolicyCreateData();

        $data->setModule($value->module);
        $data->setFunction($value->function);
        $data->setLimitations($value->getLimitations());

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

        $data = new PolicyCreateData();

        $data->setModule($value->module);
        $data->setFunction($value->function);
        $data->setLimitations($value->getLimitations());

        return $data;
    }
public function map ( ValueObject $ value ) : PolicyCreateData { if ( ! $ value instanceof PolicyCreateStruct ) { throw new InvalidArgumentException ( 'value' , 'must be an instance of ' . PolicyCreateStruct :: class ) ; } $ data = new PolicyCreateData ( ) ; $ data -> setModule ( $ value -> module ) ; $ data -> setFunction ( $ value -> function ) ; $ data -> setLimitations ( $ value -> getLimitations ( ) ) ; return $ data ; }
Maps given PolicyCreateStruct object to a PolicyCreateData object.

@param ValueObject|PolicyCreateStruct $value

@return PolicyCreateData

@throws InvalidArgumentException
Maps given PolicyCreateStruct object to a PolicyCreateData object .