[ Index ]
 

Code source de Plume CMS 1.2.2

Accédez au Source d'autres logiciels libres

Classes | Fonctions | Variables | Constantes | Tables

title

Body

[fermer]

/manager/inc/ -> lib.text.php (sommaire)

(pas de description)

Poids: 396 lignes (13 kb)
Inclus ou requis:0 fois
Référencé: 0 fois
Nécessite: 0 fichiers

Définit 1 class

text:: (16 méthodes):
  getType()
  getRawContent()
  parseContent()
  parseWikiToHtml()
  parseWikiToText()
  parseHtmlToHtml()
  parseHtmlToText()
  xlinkCreate()
  xlinkCreateTextLink()
  hexEncode()
  removeEntities()
  toXML()
  url2words()
  str2url()
  secure()
  truncate()


Classe: text  - X-Ref

The text class provides a set of methods to manipulate
text. The methods are static methods.

getType($text='')   X-Ref
Return type of text (wiki, html, etc.)

param: string Text to get the type from
return: mixed Type or empty string if not found

getRawContent($text='')   X-Ref
Get the raw content of a text.
It removes the type of the text if any.

param: string Text
return: string Raw text

parseContent($text='', $output='html')   X-Ref
Call the wiki parser depending of the content of the string

param: string unparsed content
param: string output format, ('html') or 'text'
return: string parsed content

parseWikiToHtml($text)   X-Ref
Parse wiki formatted text into XHTML

param: string Wiki formatted text
return: string XHTML

parseWikiToText($text)   X-Ref
Pas de description

parseHtmlToHtml($text)   X-Ref
Pas de description

parseHtmlToText($text)   X-Ref
Pas de description

xlinkCreate($id, $type = 'textlink', $title = '')   X-Ref
Pas de description

xlinkCreateTextLink($res)   X-Ref
Pas de description

hexEncode($str, $text=false)   X-Ref
hex encode a string not to be 'seen' by a spam system

param: string not encoded
param: bool   is the string for outside a <a ...> link?
return: string encoded

removeEntities($string)   X-Ref
Remove entities of a string

author: Olivier Meunier
param: string String with entities
return: string String without entities

toXML($string,$utf8=true)   X-Ref
Remove the HTML entities of a string to be XML compliant.

author: Olivier Meunier
param: string String to be converted
param: bool Should the output be UTF-8
return: string Converted string

url2words($url)   X-Ref
Convert an URL into words (space delimited).

param: string URL
return: string Space delimited words

str2url($str, $sep='-')   X-Ref
Convert a string into an URL string.

Je n'aime pas écrire du code becomes Je-n-aime-pas-ecrire-du-code

author: Olivier Meunier
param: string String to convert
param: string Separator ('-')
return: string URL ready string

secure($str)   X-Ref
Clean a string.
This function removes more or less everything but do not escape
the "'" for DB insertion.

author: Olivier Meunier
param: string String to "secure"
param: string Secured string

truncate($string, $length=80, $etc='...')   X-Ref
Truncate a string to a certain length if necessary without
splitting in the middle of a word and appending the $etc
string. Based on smarty modifier.

author: Monte Ohrt <monte at ohrt dot com>
param: string
param: integer Length
param: string etc. string
return: string



Généré le : Mon Nov 26 11:57:01 2007 par Balluche grâce à PHPXref 0.7
  Clicky Web Analytics