Skip to content

[Proposal] Classmap for MorphTo #3090

@tomschlick

Description

@tomschlick

If there is not currently, it would be great to have a class to (int/char) map for the MorphTo database ability.

This would save a ton of space in the db as each record would not have to store the full path of a class. It would also provide portability for moving classes around (changing namepace) without having to update the database records, just a mapping.

Ideally this map might be passed as a parameter on the morphTo method or read from a config file that may look like this

<?php

return array(
    1 => '\Domain\Folder\ClassOne',
    2 => '\Domain\Folder\ClassTwo',
);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions