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

Class: PECL_Gen_Tools_Indent

Source Location: /PECL_Gen-0.8.1/Tools/Indent.php

Class Overview


Wrapper class for whitespace related stuff


Methods


Inherited Variables

Inherited Methods


Class Details

[line 30]
Wrapper class for whitespace related stuff

all methods are actually static, the class is just needed for namespace emulation to conform with PEAR naming conventions



[ Top ]


Method Detail

indent   [line 78]

string indent( int $level, string &$text)

re-indent a block of text
  • Return: indented text
  • Access: public

Parameters:

int   $level     number of leading indent spaces
string   &$text     text to reindent

[ Top ]

linetrim   [line 111]

string linetrim( string $text)

Trim of leading and trailing whitespace-only lines
  • Return: trimmed text
  • Access: public

Parameters:

string   $text     text

[ Top ]

tabify   [line 42]

string tabify( string $text, [int $tabsize = 4])

Replace leading blanks with tabs

PHP C coding conventions require tab indention with a tabsize of 4

  • Return: tabified text
  • Access: public

Parameters:

string   $text     text to tabify
int   $tabsize     tab indention level (default: 4 spaces)

[ Top ]

untabify   [line 62]

string untabify( string $text, [int $tabsize = 4])

Replace leading tabs with blanks

PEAR PHP coding conventions require blank indention with a tabsize of 4

  • Return: untabified text
  • Access: public

Parameters:

string   $text     text to untabify
int   $tabsize     tab indention level (default: 4 spaces)

[ Top ]


Documentation generated on Sat, 1 May 2004 00:46:42 +0200 by phpDocumentor 1.2.3. PEAR Logo Copyright © PHP Group 2004.