String functionality

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

For BBCode, have you seen this: http://hu2.php.net/manual/en/book.bbcode.php ?

You can use CMarkdownParser::transform() and safeTransform() to convert your markdown text.

I’m not sure what HumanString means, but you can definitely convert your array to string with implode(’, ', array(1, 2, 3)).

If you browse the API, you’ll also discover json capabilities.

The other things you mentioned (xml, tables) offers almost infinite options, so creating a newer abstraction layer is quite unnecessary. What’s the matter with foreach?

yeh well i know everything already excists

but i want to put them all in one class. there would would probably be just shortcuts to the other funtions, i just wonna make it simple for lazy guys/girls like me.