core
[ class tree: core ] [ index: core ] [ all elements ]

Class: PlainTextFormatter

Source Location: /core/PlainTextFormatter.class.php

Class Overview

ABSTObject
   |
   --PlainTextFormatter



Author(s):

Version:

  • 0.2.32

Copyright:

  • Copyright (c) 2003 Daniel Plücken <daniel@debakel.net>

    This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License.

    This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

    You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

Variables

Methods


Child classes:

HTMLTable
A very important class to generate HTML-tables. To keep a fast performance, this class is not purely object oriented. That means that the tabledatas are not objects - their information are stored in arrays.

Inherited Methods

Class: ABSTObject

ABSTObject::printComplexData()
Prints out the more complex data by the given array.
ABSTObject::printPrimitiveData()
Prints out the primitive data by the given arrays.
ABSTObject::printStructure()
Prints out the Structure of this Object.
ABSTObject::same()
Checks whether the passed object reference points to this object.
ABSTObject::sameReferences()
Compares two references whether they points to the same object

Class Details

[line 53]


Tags:

author:  Daniel Plücken <daniel@debakel.net>
version:  0.2.32
copyright:  

Copyright (c) 2003 Daniel Plücken <daniel@debakel.net>

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

license:  GNU Lesser General Public License


[ Top ]


Class Variables

$indent =   5

[line 59]



Tags:

access:  public

Type:   integer


[ Top ]

$maxChars =  70

[line 65]



Tags:

access:  public

Type:   integer


[ Top ]



Class Methods


static method breakBy [line 85]

static string breakBy( string $text, [integer $max_chars = 0], [integer $indent = 0])

Breaks a line after $maxChars characters if no word will be cut else earlier and indent the line for $indent chars



Tags:

author:  Daniel Plücken <daniel@debakel.net>
version:  1.0
since:  0.1.0
access:  public


Parameters:

string   $text   The string which should be modified.
integer   $max_chars   The maximum of characters that should be in a
integer   $indent   The indent of all lines.

[ Top ]

static method extractXMLEmbedded [line 326]

static string extractXMLEmbedded( string $text)

Replaces entities to special characters. This is very useful for handle HTML embedded in XML.



Tags:

author:  Daniel Plücken <daniel@debakel.net>
version:  1.0
since:  0.1.6
access:  public


Parameters:

string   $text   The string which should be modified.

[ Top ]

static method format [line 217]

static string format( string $text, [integer $indent = 0], [integer $max_chars = 70], [integer $first_line_begin = 0])

Adds $indent spaces in front of each line from given string and breaks after characters count stored in the class variable $maxChars, but only if no word will be break (then the break will be earlier; before the word).



Tags:

author:  Daniel Plücken <daniel@debakel.net>
version:  1.0
since:  0.1.1
access:  public


Parameters:

string   $text   The string which should be modified.
integer   $indent   The indent of all lines.
integer   $max_chars   The maximum of characters that should be in a line.
integer   $first_line_begin   The negative indent of the first line.

[ Top ]

static method formatSQL [line 349]

static string formatSQL( string $str_in)

Formats sql querys.



Tags:

author:  Daniel Plücken <daniel@debakel.net>
version:  1.11
since:  0.2.2
access:  public


Parameters:

string   $str_in   The string which should be modified.

[ Top ]

static method indentText [line 163]

static string indentText( [string $text = ""], [integer $indent = 0], integer $maxChars)

Adds $indent spaces in front of each line.



Tags:

author:  Daniel Plücken <daniel@debakel.net>
version:  1.0
since:  0.1.1
access:  public


Parameters:

string   $text   The string which should be modified.
integer   $maxChars   The maximum of characters that should be in a
integer   $indent   The indent of all lines.

[ Top ]

static method makeXMLEmbedded [line 302]

static string makeXMLEmbedded( string $text)

Replaces special characters to entities. This is very useful for embed HTML in XML.



Tags:

author:  Daniel Plücken <daniel@debakel.net>
version:  1.0
since:  0.1.6
access:  public


Parameters:

string   $text   The string which should be modified.

[ Top ]

static method maxchars [line 277]

static string maxchars( string $text, $max_chars)

Cuts the given text that the length is not longer than $max_chars characters. The last three characters will be "...".



Tags:

author:  Daniel Plücken <daniel@debakel.net>
version:  1.1
since:  0.1.1
access:  public


Parameters:

string   $text   The string which should be modified.
   $max_chars  

[ Top ]

static method Plaintext2ASCII [line 438]

static string Plaintext2ASCII( string $inputstr)

Replaces character in that kind, that only ascii-character remain.



Tags:

author:  Daniel Plücken <daniel@debakel.net>
version:  1.0
since:  0.1.2
access:  public


Parameters:

string   $inputstr   The string which should be modified.

[ Top ]

static method reduceWhiteSpaceOfTextAreas [line 469]

static string reduceWhiteSpaceOfTextAreas( string $string)

Replaces each in series appearing whitespaces inside a textarea to only one whitespace.



Tags:

author:  Daniel Plücken <daniel@debakel.net>
version:  1.0
since:  0.1.3
access:  public


Parameters:

string   $string   The string which should be modified.

[ Top ]

static method text2HTML [line 415]

static string text2HTML( string $inputstr)

Replaces character in that kind, that only html-character remain.



Tags:

author:  Daniel Plücken <daniel@debakel.net>
version:  1.1
since:  0.1.3
access:  public


Parameters:

string   $inputstr   The string which should be modified.

[ Top ]

method setIndent [line 520]

void setIndent( integer $int)

Sets the indent of all lines of a string if the function "breakBy", "format" or "blockqoutePlainText" is used and no indent is given by parameter.



Tags:

author:  Daniel Plücken <daniel@debakel.net>
version:  1.0
since:  0.1.0
access:  public


Parameters:

integer   $int  

[ Top ]

method setMaxChars [line 536]

void setMaxChars( integer $int)

Sets the maximum of characters that should be in a line if the function "breakBy", "format" or "blockqoutePlainText" is used and no indent is given by parameter.



Tags:

author:  Daniel Plücken <daniel@debakel.net>
version:  1.0
since:  0.1.0
access:  public


Parameters:

integer   $int  

[ Top ]


Documentation generated on Thu, 05 Jun 2008 19:14:47 +0200 by phpDocumentor 1.4.1