Lack of interest Make extending Entity to add new encoded types easier

This suggestion has been closed automatically because it did not receive enough votes over an extended period of time. If you wish to see this, please search for an open suggestion and, if you don't find any, post a new one.

Xon

Well-known member
Adding new encoded type is incredibly difficult due to a lack of context in the functions, and a critical function being not easily extendable.

Code:
XF\Mvc\Entity\Entity::_castValueToType($value, $key, $type, array $columnOptions = [])
This function has all the context you could want.

Code:
XF\Mvc\Entity\Entity::_decodeColumnValue($value, array $column)
The key is missing, which is rather anoying but workable.

Code:
XF\Mvc\Entity\Manager::getEntitySourceValue($type, $value)
This function does not receive the entity, key or column options. Additionally XF\Mvc\Entity\Manager also isn't extendable without replacing the em container.

Is there any getEntitySourceValue isn't just a normal entity method? It is only ever called from an entity internal methods. All the entity per-type functions are also pure-entity functions.
 
Upvote 0
This suggestion has been closed. Votes are no longer accepted.
Back
Top Bottom