You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We need a design for an API that allows converting (bi-directional) an arbitrary number of properties to an arbitrary number of values.
A rudimentary approach could be as following:
interface ToValueConverterInterface
{
// must be inlinable?
public function **invoke(
PropertiesMapInterface $properties // these are the properties in an object - not sure if we should pass in the object
) : ValuesMapInterface; // may be an array of scalars - not sure
}
interface ToObjectConverterInterface
{
// must be inlinable?
public function **invoke(
ValuesMapInterface $values // may be an array of scalars - not sure
) : PropertiesMapInterface; // these are the properties in an object - not sure if we should pass in the object
}
interface PropertiesMappingInterface
{
public function buildToValuesConverter(MapperContext $mapperCtx) : ToValueConverterInterface;
public function buildToObjectConverter(MapperContext $) : ToObjectConverterInterface;
}
buildToValuesConverter and buildToObjectConverter must be idempotent, so that we can generate code for each direction of the conversion via DCOM-307 (Code inliner)
The text was updated successfully, but these errors were encountered:
Jira issue originally created by user @Ocramius:
We need a design for an API that allows converting (bi-directional) an arbitrary number of properties to an arbitrary number of values.
A rudimentary approach could be as following:
buildToValuesConverter
andbuildToObjectConverter
must be idempotent, so that we can generate code for each direction of the conversion via DCOM-307 (Code inliner)The text was updated successfully, but these errors were encountered: