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

Class: File_Therion_BasicFormatter

Source Location: /File_Therion-0.4.1/File/Therion/Formatters/BasicFormatter.php

Class Overview


This formatter serves some basic formatting capabilitys.


Author(s):

Copyright:

  • 2016 Benedikt Hallinger

Variables

Methods


Inherited Variables

Inherited Methods


Class Details

[line 26]
This formatter serves some basic formatting capabilitys.


[ Top ]


Class Variables

$baseindent =  "  "

[line 42]

Indent character(s)
  • Access: protected

Type:   string


[ Top ]

$clDataItemTemplate =  "%6s"

[line 63]

Template for centerline data item elements.

This an sprintf() compatible string.

  • Access: protected

Type:   string


[ Top ]

$clDataSepTemplate =  "  "

[line 72]

Template for centerline data item separator.

This an native string.

  • Access: protected

Type:   string


[ Top ]

$contextMark = array(
        'survey', 'centerline', 'centreline', 'scrap', 'surface',
        'grade', 'map'
    )

[line 51]

commands to honor as separate context
  • Access: protected

Type:   mixed


[ Top ]

$wrapAt =  0

[line 36]

Wrapping of the file.

This controls the wrapping column when writing

  • Var: column to wrap at (0=no wrapping)
  • Access: protected

Type:   int


[ Top ]



Method Detail

format   [line 83]

void format( array $lines)

Format lines.

This method is automatically invoked by File_Therion->getLines() to transparently (re-)format the lines returned to the caller.

  • Access: public

Parameters:

array   $lines   —  File_Therion_Lines to format

[ Top ]

getCenterlineDataTemplate   [line 237]

string getCenterlineDataTemplate( )

Get current Centerline data fields template.
  • Access: public

[ Top ]

getCenterlineSeparatorTemplate   [line 260]

string getCenterlineSeparatorTemplate( )

Get current Centerline data separator template.
  • Access: public

[ Top ]

getIndent   [line 206]

string getIndent( )

Get indent string.
  • Access: public

[ Top ]

getWrapping   [line 178]

int getWrapping( )

Get wrapping length.
  • Access: public

[ Top ]

isClosedCTX   [line 282]

void isClosedCTX( $cmd, $ctx)

See if current line command opens a new context.
  • Access: protected

Parameters:

   $cmd   — 
   $ctx   — 

[ Top ]

isOpenedCTX   [line 269]

void isOpenedCTX( $cmd, $ctx)

See if current line command opens a new context.
  • Access: protected

Parameters:

   $cmd   — 
   $ctx   — 

[ Top ]

setCenterlineDataTemplate   [line 227]

void setCenterlineDataTemplate( $sprintf_string)

Set Centerline data fields template.

This is the sprintf()-compatible template that is applied to centerline data items. Note that here the data is already interpreted as sring, so you should only use sprintf() string formatters.

Example:

  1.  // make data item fields 8 characters wide:
  2.  $formatter->setCenterlineDataTemplate("%8s");

  • Access: public

Parameters:

   $sprintf_string   — 

[ Top ]

setCenterlineSeparatorTemplate   [line 250]

void setCenterlineSeparatorTemplate( $string)

Set Centerline data separator template.

This is the string template that is used to separate centerline data items.

  • Access: public

Parameters:

   $string   — 

[ Top ]

setIndent   [line 192]

void setIndent( string $indent)

Set base inention of lines.

Lines will be indented using this string. Each context level will prepend this string one more time.

  • See: $contextMark for known contexts
  • Access: public

Parameters:

string   $indent   — 

[ Top ]

setWrapping   [line 164]

void setWrapping( $length, int $lentgh)

Set wrapping of lines.

Lines will be wrapped after this length.

  • Access: public

Parameters:

int   $lentgh   —  column to wrap at (0=no wrapping)
   $length   — 

[ Top ]


Documentation generated on Mon, 11 Mar 2019 15:09:45 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.