phpDocumentor SpoolTemplate
[ Back ] [ class tree: SpoolTemplate ] [ index: SpoolTemplate ] [ all elements ]

Class: CPageMgr

Source Location: /sptpl_clsPageMgr.php

Class CPageMgr

Class Overview

sptpl_clsPageMgr.php

Class PageManeger definition. This class manage all the output detail, such margins, page size (and skip to the next page) and print (to the file) each row.

Located in /sptpl_clsPageMgr.php [line 41]



		
				Author(s):
		
		
		
Information Tags:
Version:  $Header: d:\cvs/classistd/sptpl/sptpl_clsPageMgr.php,v 2.16 2005/03/17 12:46:48 Darvin Exp $
Copyright:  sptpl_clsPageMgr.php is part of Sptpl project http://www.andrioli.com/en/sptpl.html and it is LGPL

Properties

Methods

[ Top ]
Direct descendents
Child Class Description
CPagePdf Page manager extension with support to Pdf output
CPagePrinter Page manager extension with support to printer (Windows box only) It use the extension php_printer.dll to write out directly to the printer
CPagePs PostScript output module. It requires the ps extension of PHP

[ Top ]
Property Summary
object CDataStorage   $clsDataManager   Reference to the DataStorage class
array   $ColumnSet   Current ColumnSet Array of CColumn object.
string   $CurrentColumnSetId   Id of the current columnset selected. It is uesd to avoid
integer   $CurrentLine   Index of the current item to be inserted into $PageData
mixed   $CurrentPage  
array   $DefinedColumnSet   array with all columnset defined. The first index is the columnsset
array   $Fonts   Array containing all defined class CFont
array   $FooterColSet   Column set used to print out the page footer
array   $HeaderColSet   Column set used to print out the page header
array   $LineHeight   Max height for each row.
array   $Margins   Margins setting.
integer   $OutputFp   Handler to the output file
array   $PageData   Memory image of the page, each item of this array is one row of the page. Each row is made by many columns The columns 0 contains the whole page, the index > 0 point to the column defined by column set.
string   $PageFormat   Page format from the configuration file.
array   $PageSize   Size of the page (width, length) as number of characters and rows.
array   $Report   Array holding the text to print at the begin and end page.
array   $tblFormatIso   Table contains the size for the ISO code Each index contains an array with two key length e width
integer   $TopPageLine   Index of the first line of the page

[ Top ]
Method Summary
CPageMgr   CPageMgr()   Class constructor. It initalize all configuration varaibale
void   BeginReport()   Start to printout the report. OPen the output file, initialize some variable.
void   CloseReport()   Perform the requested job for ending the report.
void   EndParseXml()   Function executed at the end of the xml parsing. I run the final configuration
boolean   MvAbsolutePos()   Move the currentline to nRow. It return TRUE on success,
boolean   MvBottom()   Move to the last row before the bottom margin It return TRUE on success,
boolean   MvRelativePos()   Move the currentline up or down of nRow rows. It return TRUE on success,
boolean   MvTop()   Move to the first row after the top margin It return TRUE on success,
void   NewColumnSet()   Set new columnset. Each block may hve its own columnset. Before write the text, the
void   NewFont()   Create an istance of the CFont class based on configuration file.
void   NewPage()   Begin a new page. Close the previous, if any, and printout the 'openpage' text if specified
void   ParseXml()   Parse the configuration node for a new information about the layout
void   PrintColumnsHeader()   loop over all columns inside the current columnset and print the column's header, if set
void   WriteOut()   Pass the text to the appropriate column. It returns a CUnit object containing
void   WriteOutFooterRow()   Print out the text row (used only for the closepage row)
void   WriteOutHeaderRow()   Print out the text row (used only for the closepage row)
void   _EndReport()   Print out the 'closereport' text
void   _StartReport()   Print out the 'beginreport' text
boolean   __php5()   Return True if the current PHP version is 5

[ Top ]
Properties
object CDataStorage   $clsDataManager [line 103]

Reference to the DataStorage class


[ Top ]
array   $ColumnSet [line 125]

Current ColumnSet Array of CColumn object.

Each block my set its own column set. Columns 0 is the whole page

API Tags:
See:  CPageMgr::NewColumnSet()


[ Top ]
string   $CurrentColumnSetId [line 148]

Id of the current columnset selected. It is uesd to avoid

to reload the same columnset if it is selected again

API Tags:
See:  CPageMgr::NewColumnSet()


[ Top ]
integer   $CurrentLine [line 82]

Index of the current item to be inserted into $PageData

API Tags:
See:  CPageMgr::WriteOut()


[ Top ]
mixed   $CurrentPage [line 91]

[ Top ]
array   $DefinedColumnSet [line 141]

array with all columnset defined. The first index is the columnsset

identifier


[ Top ]
array   $Fonts [line 158]

Array containing all defined class CFont


[ Top ]
array   $FooterColSet [line 135]

Column set used to print out the page footer


[ Top ]
array   $HeaderColSet [line 130]

Column set used to print out the page header


[ Top ]
array   $LineHeight [line 153]

Max height for each row.


[ Top ]
array   $Margins [line 75]

Margins setting.

Allowed index: top, bottom, left, right


[ Top ]
integer   $OutputFp [line 47]

Handler to the output file


[ Top ]
array   $PageData [line 116]

Memory image of the page, each item of this array is one row of the page. Each row is made by many columns The columns 0 contains the whole page, the index > 0 point to the column defined by column set.

Each element is a CUnit object The array is load by WriteOut and written to the file by _ClosePage

API Tags:
See:  _ClosePage()
See:  CPageMgr::WriteOut()


[ Top ]
string   $PageFormat [line 69]

Page format from the configuration file.

It is an ISO code

API Tags:
See:  CPageMgr::$tblFormatIso


[ Top ]
array   $PageSize [line 55]

Size of the page (width, length) as number of characters and rows.

Index length = number of rows Index width = number of characters for each row


[ Top ]
array   $Report [line 98]

Array holding the text to print at the begin and end page.

See ParseXml for detail about the text stored

API Tags:
See:  CPageMgr::ParseXml()


[ Top ]
array   $tblFormatIso [line 62]

Table contains the size for the ISO code Each index contains an array with two key length e width


[ Top ]
integer   $TopPageLine [line 89]

Index of the first line of the page

API Tags:
See:  CPageMgr::WriteOut()


[ Top ]
Methods
Constructor CPageMgr  [line 164]

  CPageMgr CPageMgr( object CDataStorage &$DataMgr  )

Class constructor. It initalize all configuration varaibale

Parameters:
object CDataStorage   &$DataMgr:  Reference to the DataStorage istance

API Tags:
Access:  public


[ Top ]
BeginReport  [line 444]

  void BeginReport( string $OutFile  )

Start to printout the report. OPen the output file, initialize some variable.

Parameters:
string   $OutFile:  output file name

API Tags:
Access:  public


Redefined in descendants as:

[ Top ]
CloseReport  [line 457]

  void CloseReport( )

Perform the requested job for ending the report.

Print the end report text, close the current page and the output file


API Tags:
Access:  public


Redefined in descendants as:

[ Top ]
EndParseXml  [line 394]

  void EndParseXml( )

Function executed at the end of the xml parsing. I run the final configuration

checks and complete the configration data


API Tags:
Access:  public


Redefined in descendants as:

[ Top ]
MvAbsolutePos  [line 706]

  boolean MvAbsolutePos( integer $nRow  )

Move the currentline to nRow. It return TRUE on success,

FALSE otherwise

Parameters:
integer   $nRow:  New current line number

API Tags:
Access:  public


[ Top ]
MvBottom  [line 734]

  boolean MvBottom( )

Move to the last row before the bottom margin It return TRUE on success,

FALSE otherwise


API Tags:
Access:  public


[ Top ]
MvRelativePos  [line 683]

  boolean MvRelativePos( integer $nRow  )

Move the currentline up or down of nRow rows. It return TRUE on success,

FALSE otherwise

Parameters:
integer   $nRow:  Number of row to add (or subtract) from the current line

API Tags:
Access:  public


[ Top ]
MvTop  [line 721]

  boolean MvTop( )

Move to the first row after the top margin It return TRUE on success,

FALSE otherwise


API Tags:
Access:  public


[ Top ]
NewColumnSet  [line 422]

  void NewColumnSet( string $NewSet  )

Set new columnset. Each block may hve its own columnset. Before write the text, the

block passes its configuration. This configuration override the previous one, so I must write the previous text

Parameters:
string   $NewSet:  id of the new columnset to use

API Tags:
Access:  public


[ Top ]
NewFont  [line 247]

  void NewFont( object CXml2Array $node  )

Create an istance of the CFont class based on configuration file.

Parameters:
object CXml2Array   $node:  Node with font configuration

API Tags:
Access:  public


Redefined in descendants as:

[ Top ]
NewPage  [line 492]

  void NewPage( [mixed $FromComposeRow = FALSE]  )

Begin a new page. Close the previous, if any, and printout the 'openpage' text if specified


API Tags:
Access:  public


Redefined in descendants as:
  • CPagePdf::NewPage() : Begin a new page. Close the previous, if any, and printout the 'openpage' text if specified
  • CPagePrinter::NewPage() : Begin a new page. Close the previous, if any, and printout the 'openpage' text if specified
  • CPagePs::NewPage() : Begin a new page. Close the previous, if any, and printout the 'openpage' text if specified

[ Top ]
ParseXml  [line 199]

  void ParseXml( object CXml2Array $cfg  )

Parse the configuration node for a new information about the layout

of the page

Parameters:
object CXml2Array   $cfg:  Class containingg the configuration

API Tags:
Access:  public


[ Top ]
PrintColumnsHeader  [line 670]

  void PrintColumnsHeader( )

loop over all columns inside the current columnset and print the column's header, if set


API Tags:
Access:  public


[ Top ]
WriteOut  [line 614]

  void WriteOut( string $txt, [string $align = ''], [integer $colPos = 0], [integer $Column = 0], [string $idfont = '']  )

Pass the text to the appropriate column. It returns a CUnit object containing

the text with format (alignment, font) according to the given parameters

Parameters:
string   $txt:  Text to write
string   $align:  Text alignment, left, center, right
integer   $colPos: 
integer   $Column:  column where place the text
string   $idfont:  Id of the selected font. If not set, the font defined for the column will be used

API Tags:
Access:  public


[ Top ]
WriteOutFooterRow  [line 638]

  void WriteOutFooterRow( string $txt, [string $align = ''], [integer $colPos = 0], [mixed $idfont = '']  )

Print out the text row (used only for the closepage row)

Parameters:
string   $txt:  Text to write
string   $align:  Text alignment, left, center, right
integer   $colPos: 

API Tags:
Access:  public


[ Top ]
WriteOutHeaderRow  [line 653]

  void WriteOutHeaderRow( string $txt, [string $align = ''], [integer $colPos = 0], [mixed $idfont = '']  )

Print out the text row (used only for the closepage row)

Parameters:
string   $txt:  Text to write
string   $align:  Text alignment, left, center, right
integer   $colPos: 

API Tags:
Access:  public


[ Top ]
_EndReport  [line 480]

  void _EndReport( )

Print out the 'closereport' text


API Tags:
Access:  public


[ Top ]
_StartReport  [line 470]

  void _StartReport( )

Print out the 'beginreport' text


API Tags:
Access:  public


[ Top ]
__php5  [line 747]

  boolean __php5( )

Return True if the current PHP version is 5

False if is PHP4


API Tags:
Access:  public


[ Top ]

Documentation generated on Mon, 28 Mar 2005 15:13:18 +0200 by phpDocumentor 1.3.0RC3