Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Private Member Functions
napdf Class Reference

This is the FPDF class, used to create the PDF. More...

List of all members.

Public Member Functions

 set_sort ($in_keys)
 This is the way you sort the meeting data.

Static Public Member Functions

static MakeNAPDF ($in_x, $in_y, $in_http_vars, $in_units= 'in', $in_orientation= 'P', $in_keys=null, $in_lang_search=null)
 This is the object factory function. It will return the new instance of the napdf class.
static sort_meeting_data_callback (&$in_a, &$in_b)
 This is a static callback function to be used for sorting the multi-dimensional meeting_data array. It uses the sort_order_keys array to determine the sort.

Public Attributes

 $bmlt_instance = null
 We manage an instance of the class used to extract CSV data from the root server.
 $meeting_data = null
 This will be an array, with the returned meeting data.
 $format_data = null
 This will be an array, with the returned format data.
 $lang_search = array ( 'en' )
 Set this to the specific language[s], if we are looking for formats in a specific language. Default is 'en'.

Static Public Attributes

static $fpdf_instance = null
 This is a SINGLETON, so we'll be using this as our instance.
static $sort_order_keys = null
 This specifies which keys will be sorted. See the set_sort function for a description of how this works.
static $week_starts = 1
 We assume that the week starts on Sunday. 1 - Sunday, 7 - Saturday. Set this to whatever day the week starts.
static $sort_callback = 'napdf::sort_meeting_data_callback'
 Used to sort the CSV data. It can be replaced with a call to a custom sorter.

Private Member Functions

 FetchCSV ($in_http_vars=null)
 Fetches the CSV data, and loads up our internal data array with all the meeting data. It creates an associative array of the meeting data.
 __construct ($in_x, $in_y, $in_http_vars, $in_units= 'in', $in_orientation= 'P', $in_lang_search=null)
 The class constructor. Sets up the instance, and reads in the meeting data.

Detailed Description

This is the FPDF class, used to create the PDF.

This is the class we use to communicate with the root server. This class sets up a boilerplate FPDF instance to be used to generate the PDF.

It is a SINGLETON pattern. This should be created in bunches, because the objects can be quite big, and the static elements make the key sorting easier.


Constructor & Destructor Documentation

napdf::__construct ( in_x,
in_y,
in_http_vars,
in_units = 'in',
in_orientation = 'P',
in_lang_search = null 
) [private]

The class constructor. Sets up the instance, and reads in the meeting data.

It's private, in order to keep multiple instances from being created. Use MakeNAPDF() to create objects.

Parameters:
in_xThe width of each printed page, in $in_units
in_yThe height of each printed page, in $in_units
in_http_varsThe various parameters used to dictate the meeting search.
in_unitsThe measurement units.
  • 'in' (Inches)
  • 'mm' (Millimeters)
  • 'cm' (Centimeters)
  • 'pt' (Points) Default is 'in'.
in_orientationThe orientation
  • 'P' (Portrait)
  • 'L' (Landscape) Default is 'P'
in_lang_searchAn array of language enums, used to extract the correct format codes.

Member Function Documentation

napdf::FetchCSV ( in_http_vars = null) [private]

Fetches the CSV data, and loads up our internal data array with all the meeting data. It creates an associative array of the meeting data.

This loads the internal $meeting_data nested array, in which each meeting is one row, then an associative array of meeting data values.

Parameters:
in_http_varsThese contain alternatives to the $_GET and/or $_POST parameters. Default is null.

Referenced by __construct().

static napdf::MakeNAPDF ( in_x,
in_y,
in_http_vars,
in_units = 'in',
in_orientation = 'P',
in_keys = null,
in_lang_search = null 
) [static]

This is the object factory function. It will return the new instance of the napdf class.

NOTE: This ALWAYS destroys the original object, so you need to keep that in mind!

Returns:
A reference to an instance of napdf
Parameters:
in_xThe width of each printed page, in $in_units
in_yThe height of each printed page, in $in_units
in_http_varsThe various parameters used to dictate the meeting search.
in_unitsThe measurement units.
  • 'in' (Inches)
  • 'mm' (Millimeters)
  • 'cm' (Centimeters)
  • 'pt' (Points) Default is 'in'.
in_orientationThe orientation
  • 'P' (Portrait)
  • 'L' (Landscape) Default is 'P'
in_keysOptional. If the sort keys are passed in here, we'll sort the data.
in_lang_searchOptional. An array of language enums, used to extract the correct format codes.

Referenced by printableList::__construct().

napdf::set_sort ( in_keys)

This is the way you sort the meeting data.

Parameters:
in_keysThis is the way we control a sort. It is both very powerful, and non-trivial. This is an associative array, and the order of the keys determines sort priority, with the first key being the highest priority, and subsequent keys descending in importance.

This sort is far more powerful than the basic one used in the root server. It is designed to allow you to be very specific in your sort criteria for your printed list.

The value of each key determines the direction of the sort. If it is 0, false or null, the sort will be descending (lower to greater). If it is 1 or true, then the sort will be ascending.

This function executes the sort, so the meeting_data array is sorted after this function.

static napdf::sort_meeting_data_callback ( &$  in_a,
&$  in_b 
) [static]

This is a static callback function to be used for sorting the multi-dimensional meeting_data array. It uses the sort_order_keys array to determine the sort.

Returns:
an integer. -1 if a < b, 0 if a == b, or 1 if a > b.
Parameters:
in_aThe first meeting array to compare
in_bThe second meeting array to compare

Member Data Documentation

napdf::$bmlt_instance = null

We manage an instance of the class used to extract CSV data from the root server.

napdf::$format_data = null

This will be an array, with the returned format data.

Referenced by FetchCSV().

napdf::$fpdf_instance = null [static]

This is a SINGLETON, so we'll be using this as our instance.

Referenced by MakeNAPDF().

napdf::$lang_search = array ( 'en' )

Set this to the specific language[s], if we are looking for formats in a specific language. Default is 'en'.

napdf::$meeting_data = null

This will be an array, with the returned meeting data.

Referenced by FetchCSV().

napdf::$sort_callback = 'napdf::sort_meeting_data_callback' [static]

Used to sort the CSV data. It can be replaced with a call to a custom sorter.

Referenced by listprint_napdf::__construct(), and booklet_napdf::__construct().

napdf::$sort_order_keys = null [static]

This specifies which keys will be sorted. See the set_sort function for a description of how this works.

Referenced by sort_meeting_data_callback(), listprint_napdf::sort_meeting_data_callback(), and booklet_napdf::sort_meeting_data_callback().

napdf::$week_starts = 1 [static]

We assume that the week starts on Sunday. 1 - Sunday, 7 - Saturday. Set this to whatever day the week starts.

Referenced by sort_meeting_data_callback(), listprint_napdf::sort_meeting_data_callback(), and booklet_napdf::sort_meeting_data_callback().


The documentation for this class was generated from the following file:
 All Classes Files Functions Variables Enumerations