something like
convert($text="some_string",$from="MODEL",$to="FORUM")
witch would remove all escaped text and put all BB code in it to html
or convert(($text="somestring",$from="MODEL",$to="HTML")
witch would remove escaped text and set add nl2br etc
or something like
$convert = new CSting($text);
$convert->setType("MODEL");
$convert->toBBcode;
and then render the $sting->content or something
or $convert->toMarkDown;
witch would all be shortcuts to the convert function ofc
al load of actions could be done aswell
like:
$convert->setType("ARRAY")
$convert->toHumanString(",") //witch can only be done on an array, json array, etc
and would create from array(1,2,3)
"1, 2, 3."
other thinngs like
toJSON
toXml
toCSS (in case you have a multiple dimension array or object with the css information in)(i could defenatly see use in use in css in database for theming options)
toHtmlTable
you can make up any stuff, i’m defenatly gonna try this als extion/component