Merge pull request #7 from stevleibelt/master

Reverteds protected and private properties to public ones.
This commit is contained in:
Carsten Schmitz 2016-03-16 08:15:02 +01:00
commit 3b766dc161
11 changed files with 233 additions and 163 deletions

View File

@ -55,44 +55,44 @@ class Spreadsheet_Excel_Writer_BIFFwriter extends PEAR
* The BIFF/Excel version (5). * The BIFF/Excel version (5).
* @var integer * @var integer
*/ */
protected $BIFF_version = 0x0500; public $BIFF_version = 0x0500;
/** /**
* The byte order of this architecture. 0 => little endian, 1 => big endian * The byte order of this architecture. 0 => little endian, 1 => big endian
* @var integer * @var integer
*/ */
protected $byteOrder; public $byteOrder;
/** /**
* The string containing the data of the BIFF stream * The string containing the data of the BIFF stream
* @var string * @var string
*/ */
protected $data; public $data;
/** /**
* The size of the data in bytes. Should be the same as strlen($this->data) * The size of the data in bytes. Should be the same as strlen($this->data)
* @var integer * @var integer
*/ */
protected $dataSize; public $dataSize;
/** /**
* The maximun length for a BIFF record. See addContinue() * The maximun length for a BIFF record. See addContinue()
* @var integer * @var integer
* @see addContinue() * @see addContinue()
*/ */
protected $limit; public $limit;
/** /**
* The temporary dir for storing the OLE file * The temporary dir for storing the OLE file
* @var string * @var string
*/ */
protected $temporaryDirectory; public $temporaryDirectory;
/** /**
* The temporary file for storing the OLE file * The temporary file for storing the OLE file
* @var string * @var string
*/ */
protected $temporaryFile; public $temporaryFile;
/** /**
* Constructor * Constructor

View File

@ -42,208 +42,215 @@
class Spreadsheet_Excel_Writer_Format extends PEAR class Spreadsheet_Excel_Writer_Format extends PEAR
{ {
/**
* The BIFF version for the workbook
* @var integer
*/
public $_BIFF_version;
/**
* Index to the FONT record.
* @var integer
*/
public $font_index;
/** /**
* The index given by the workbook when creating a new format. * The index given by the workbook when creating a new format.
* @var integer * @var integer
*/ */
protected $_xf_index; public $_xf_index;
/**
* Index to the FONT record.
* @var integer
*/
public $font_index;
/** /**
* The font name (ASCII). * The font name (ASCII).
* @var string * @var string
*/ */
protected $_font_name; public $_font_name;
/** /**
* Height of font (1/20 of a point) * Height of font (1/20 of a point)
* @var integer * @var integer
*/ */
protected $_size; public $_size;
/** /**
* Bold style * Bold style
* @var integer * @var integer
*/ */
protected $_bold; public $_bold;
/** /**
* Bit specifiying if the font is italic. * Bit specifiying if the font is italic.
* @var integer * @var integer
*/ */
protected $_italic; public $_italic;
/** /**
* Index to the cell's color * Index to the cell's color
* @var integer * @var integer
*/ */
protected $_color; public $_color;
/** /**
* The text underline property * The text underline property
* @var integer * @var integer
*/ */
protected $_underline; public $_underline;
/** /**
* Bit specifiying if the font has strikeout. * Bit specifiying if the font has strikeout.
* @var integer * @var integer
*/ */
protected $_font_strikeout; public $_font_strikeout;
/** /**
* Bit specifiying if the font has outline. * Bit specifiying if the font has outline.
* @var integer * @var integer
*/ */
protected $_font_outline; public $_font_outline;
/** /**
* Bit specifiying if the font has shadow. * Bit specifiying if the font has shadow.
* @var integer * @var integer
*/ */
protected $_font_shadow; public $_font_shadow;
/** /**
* 2 bytes specifiying the script type for the font. * 2 bytes specifiying the script type for the font.
* @var integer * @var integer
*/ */
protected $_font_script; public $_font_script;
/** /**
* Byte specifiying the font family. * Byte specifiying the font family.
* @var integer * @var integer
*/ */
protected $_font_family; public $_font_family;
/** /**
* Byte specifiying the font charset. * Byte specifiying the font charset.
* @var integer * @var integer
*/ */
protected $_font_charset; public $_font_charset;
/** /**
* An index (2 bytes) to a FORMAT record (number format). * An index (2 bytes) to a FORMAT record (number format).
* @var integer * @var integer
*/ */
protected $_num_format; public $_num_format;
/** /**
* Bit specifying if formulas are hidden. * Bit specifying if formulas are hidden.
* @var integer * @var integer
*/ */
protected $_hidden; public $_hidden;
/** /**
* Bit specifying if the cell is locked. * Bit specifying if the cell is locked.
* @var integer * @var integer
*/ */
protected $_locked; public $_locked;
/** /**
* The three bits specifying the text horizontal alignment. * The three bits specifying the text horizontal alignment.
* @var integer * @var integer
*/ */
protected $_text_h_align; public $_text_h_align;
/** /**
* Bit specifying if the text is wrapped at the right border. * Bit specifying if the text is wrapped at the right border.
* @var integer * @var integer
*/ */
protected $_text_wrap; public $_text_wrap;
/** /**
* The three bits specifying the text vertical alignment. * The three bits specifying the text vertical alignment.
* @var integer * @var integer
*/ */
protected $_text_v_align; public $_text_v_align;
/** /**
* 1 bit, apparently not used. * 1 bit, apparently not used.
* @var integer * @var integer
*/ */
protected $_text_justlast; public $_text_justlast;
/** /**
* The two bits specifying the text rotation. * The two bits specifying the text rotation.
* @var integer * @var integer
*/ */
protected $_rotation; public $_rotation;
/** /**
* The cell's foreground color. * The cell's foreground color.
* @var integer * @var integer
*/ */
protected $_fg_color; public $_fg_color;
/** /**
* The cell's background color. * The cell's background color.
* @var integer * @var integer
*/ */
protected $_bg_color; public $_bg_color;
/** /**
* The cell's background fill pattern. * The cell's background fill pattern.
* @var integer * @var integer
*/ */
protected $_pattern; public $_pattern;
/** /**
* Style of the bottom border of the cell * Style of the bottom border of the cell
* @var integer * @var integer
*/ */
protected $_bottom; public $_bottom;
/** /**
* Color of the bottom border of the cell. * Color of the bottom border of the cell.
* @var integer * @var integer
*/ */
protected $_bottom_color; public $_bottom_color;
/** /**
* Style of the top border of the cell * Style of the top border of the cell
* @var integer * @var integer
*/ */
protected $_top; public $_top;
/** /**
* Color of the top border of the cell. * Color of the top border of the cell.
* @var integer * @var integer
*/ */
protected $_top_color; public $_top_color;
/** /**
* Style of the left border of the cell * Style of the left border of the cell
* @var integer * @var integer
*/ */
protected $_left; public $_left;
/** /**
* Color of the left border of the cell. * Color of the left border of the cell.
* @var integer * @var integer
*/ */
protected $_left_color; public $_left_color;
/** /**
* Style of the right border of the cell * Style of the right border of the cell
* @var integer * @var integer
*/ */
protected $_right; public $_right;
/** /**
* Color of the right border of the cell. * Color of the right border of the cell.
* @var integer * @var integer
*/ */
protected $_right_color; public $_right_color;
/** /**
* Constructor * Constructor
* *
* @access private * @access private
* @param integer $BIFF_version
* @param integer $index the XF index for the format. * @param integer $index the XF index for the format.
* @param array $properties array with properties to be set on initialization. * @param array $properties array with properties to be set on initialization.
*/ */
@ -1096,7 +1103,7 @@ class Spreadsheet_Excel_Writer_Format extends PEAR
* Sets the font family name. * Sets the font family name.
* *
* @access public * @access public
* @param string $fontfamily The font family name. Possible values are: * @param string $font_family The font family name. Possible values are:
* 'Times New Roman', 'Arial', 'Courier'. * 'Times New Roman', 'Arial', 'Courier'.
*/ */
public function setFontFamily($font_family) public function setFontFamily($font_family)

View File

@ -107,65 +107,71 @@ define('SPREADSHEET_EXCEL_WRITER_CONCAT', '&');
class Spreadsheet_Excel_Writer_Parser extends PEAR class Spreadsheet_Excel_Writer_Parser extends PEAR
{ {
/**
* The BIFF version for the workbook
* @var integer
*/
public $_BIFF_version;
/** /**
* The index of the character we are currently looking at * The index of the character we are currently looking at
* @var integer * @var integer
*/ */
protected $_current_char; public $_current_char;
/** /**
* The token we are working on. * The token we are working on.
* @var string * @var string
*/ */
protected $_current_token; public $_current_token;
/** /**
* The formula to parse * The formula to parse
* @var string * @var string
*/ */
protected $_formula; public $_formula;
/**
* @var array
*/
public $_functions;
/** /**
* The character ahead of the current char * The character ahead of the current char
* @var string * @var string
*/ */
protected $_lookahead; public $_lookahead;
/** /**
* The parse tree to be generated * The parse tree to be generated
* @var string * @var string
*/ */
protected $_parse_tree; public $_parse_tree;
/** /**
* The byte order. 1 => big endian, 0 => little endian. * The byte order. 1 => big endian, 0 => little endian.
* @var integer * @var integer
*/ */
protected $_byte_order; public $_byte_order;
/** /**
* Array of external sheets * Array of external sheets
* @var array * @var array
*/ */
protected $_ext_sheets; public $_ext_sheets;
/** /**
* Array of sheet references in the form of REF structures * Array of sheet references in the form of REF structures
* @var array * @var array
*/ */
protected $_references; public $_references;
/**
* The BIFF version for the workbook
* @var integer
*/
protected $_BIFF_version;
/** /**
* The class constructor * The class constructor
* *
* @param integer $byte_order The byte order (Little endian or Big endian) of the architecture * @param integer $byte_order The byte order (Little endian or Big endian) of the architecture
(optional). 1 => big endian, 0 (default) little endian. * (optional). 1 => big endian, 0 (default) little endian.
* @param integer $biff_version
*/ */
public function __construct($byte_order, $biff_version) public function __construct($byte_order, $biff_version)
{ {
@ -597,6 +603,7 @@ class Spreadsheet_Excel_Writer_Parser extends PEAR
* *
* @access private * @access private
* @param mixed $num an integer or double for conversion to its ptg value * @param mixed $num an integer or double for conversion to its ptg value
* @return string
*/ */
protected function _convertNumber($num) protected function _convertNumber($num)
{ {
@ -660,11 +667,13 @@ class Spreadsheet_Excel_Writer_Parser extends PEAR
} }
/** /**
* Convert an Excel range such as A1:D4 to a ptgRefV. * Convert an Excel range such as A1:D4 to a ptgRefV.
* *
* @access private * @access private
* @param string $range An Excel range in the A1:A2 or A1..A2 format. * @param string $range An Excel range in the A1:A2 or A1..A2 format.
*/ * @param int $class
* @return array|string
*/
protected function _convertRange2d($range, $class=0) protected function _convertRange2d($range, $class=0)
{ {

View File

@ -45,25 +45,25 @@ define('OP_LTE', 0x07);
*/ */
class Spreadsheet_Excel_Writer_Validator class Spreadsheet_Excel_Writer_Validator
{ {
protected $_type; public $_type;
protected $_style; public $_style;
protected $_fixedList; public $_fixedList;
protected $_blank; public $_blank;
protected $_incell; public $_incell;
protected $_showprompt; public $_showprompt;
protected $_showerror; public $_showerror;
protected $_title_prompt; public $_title_prompt;
protected $_descr_prompt; public $_descr_prompt;
protected $_title_error; public $_title_error;
protected $_descr_error; public $_descr_error;
protected $_operator; public $_operator;
protected $_formula1; public $_formula1;
protected $_formula2; public $_formula2;
/** /**
* The parser from the workbook. Used to parse validation formulas also * The parser from the workbook. Used to parse validation formulas also
* @var Spreadsheet_Excel_Writer_Parser * @var Spreadsheet_Excel_Writer_Parser
*/ */
protected $_parser; public $_parser;
public function __construct($parser) public function __construct($parser)
{ {

View File

@ -51,132 +51,132 @@ class Spreadsheet_Excel_Writer_Workbook extends Spreadsheet_Excel_Writer_BIFFwri
* Filename for the Workbook * Filename for the Workbook
* @var string * @var string
*/ */
protected $fileName; public $fileName;
/** /**
* Formula parser * Formula parser
* @var object Parser * @var Spreadsheet_Excel_Writer_Parser
*/ */
protected $parser; public $parser;
/** /**
* Flag for 1904 date system (0 => base date is 1900, 1 => base date is 1904) * Flag for 1904 date system (0 => base date is 1900, 1 => base date is 1904)
* @var integer * @var integer
*/ */
protected $flagFor1904; public $flagFor1904;
/** /**
* The active worksheet of the workbook (0 indexed) * The active worksheet of the workbook (0 indexed)
* @var integer * @var integer
*/ */
protected $activeSheet; public $activeSheet;
/** /**
* 1st displayed worksheet in the workbook (0 indexed) * 1st displayed worksheet in the workbook (0 indexed)
* @var integer * @var integer
*/ */
protected $firstSheet; public $firstSheet;
/** /**
* Number of workbook tabs selected * Number of workbook tabs selected
* @var integer * @var integer
*/ */
protected $selectedWorkBook; public $selectedWorkBook;
/** /**
* Index for creating adding new formats to the workbook * Index for creating adding new formats to the workbook
* @var integer * @var integer
*/ */
protected $xf_index; public $xf_index;
/** /**
* Flag for preventing close from being called twice. * Flag for preventing close from being called twice.
* @var integer * @var integer
* @see close() * @see close()
*/ */
protected $fileIsClosed; public $fileIsClosed;
/** /**
* The BIFF file size for the workbook. * The BIFF file size for the workbook.
* @var integer * @var integer
* @see calcSheetOffsets() * @see calcSheetOffsets()
*/ */
protected $biffSize; public $biffSize;
/** /**
* The default sheetname for all sheets created. * The default sheetname for all sheets created.
* @var string * @var string
*/ */
protected $sheetName; public $sheetName;
/** /**
* The default XF format. * The default XF format.
* @var object Format * @var Spreadsheet_Excel_Writer_Format
*/ */
protected $temporaryFormat; public $temporaryFormat;
/** /**
* Array containing references to all of this workbook's worksheets * Array containing references to all of this workbook's worksheets
* @var array * @var array
*/ */
protected $workSheet; public $workSheet;
/** /**
* Array of sheet names for creating the EXTERNSHEET records * Array of sheet names for creating the EXTERNSHEET records
* @var array * @var array
*/ */
protected $sheetNames; public $sheetNames;
/** /**
* Array containing references to all of this workbook's formats * Array containing references to all of this workbook's formats
* @var array|Spreadsheet_Excel_Writer_Format[] * @var array|Spreadsheet_Excel_Writer_Format[]
*/ */
protected $formats; public $formats;
/** /**
* Array containing the colour palette * Array containing the colour palette
* @var array * @var array
*/ */
protected $palette; public $palette;
/** /**
* The default format for URLs. * The default format for URLs.
* @var object Format * @var Spreadsheet_Excel_Writer_Format
*/ */
protected $urlFormat; public $urlFormat;
/** /**
* The codepage indicates the text encoding used for strings * The codepage indicates the text encoding used for strings
* @var integer * @var integer
*/ */
protected $codePage; public $codePage;
/** /**
* The country code used for localization * The country code used for localization
* @var integer * @var integer
*/ */
protected $countryCode; public $countryCode;
/** /**
* number of bytes for size info of strings * number of bytes for size info of strings
* @var integer * @var integer
*/ */
protected $stringSizeInfoSize; public $stringSizeInfoSize;
/** @var int */ /** @var int */
protected $totalStringLength; public $totalStringLength;
/** @var int */ /** @var int */
protected $uniqueString; public $uniqueString;
/** @var array */ /** @var array */
protected $tableOfStrings; public $tableOfStrings;
/** @var int */ /** @var int */
protected $stringSizeInfo; public $stringSizeInfo;
/** @var array */ /** @var array */
private $blockSize; public $blockSize;
/** /**
* Class constructor * Class constructor

View File

@ -59,319 +59,319 @@ class Spreadsheet_Excel_Writer_Worksheet extends Spreadsheet_Excel_Writer_BIFFwr
/** /**
* Reference to the (default) Format object for URLs * Reference to the (default) Format object for URLs
* @var object Format * @var Spreadsheet_Excel_Writer_Format
*/ */
protected $_url_format; public $_url_format;
/** /**
* Reference to the parser used for parsing formulas * Reference to the parser used for parsing formulas
* @var object Format * @var Spreadsheet_Excel_Writer_Format
*/ */
protected $_parser; public $_parser;
/** /**
* Filehandle to the temporary file for storing data * Filehandle to the temporary file for storing data
* @var resource * @var resource
*/ */
protected $_filehandle; public $_filehandle;
/** /**
* Boolean indicating if we are using a temporary file for storing data * Boolean indicating if we are using a temporary file for storing data
* @var bool * @var bool
*/ */
protected $_using_tmpfile; public $_using_tmpfile;
/** /**
* Maximum number of rows for an Excel spreadsheet (BIFF5) * Maximum number of rows for an Excel spreadsheet (BIFF5)
* @var integer * @var integer
*/ */
protected $_xls_rowmax; public $_xls_rowmax;
/** /**
* Maximum number of columns for an Excel spreadsheet (BIFF5) * Maximum number of columns for an Excel spreadsheet (BIFF5)
* @var integer * @var integer
*/ */
protected $_xls_colmax; public $_xls_colmax;
/** /**
* Maximum number of characters for a string (LABEL record in BIFF5) * Maximum number of characters for a string (LABEL record in BIFF5)
* @var integer * @var integer
*/ */
protected $_xls_strmax; public $_xls_strmax;
/** /**
* First row for the DIMENSIONS record * First row for the DIMENSIONS record
* @var integer * @var integer
* @see _storeDimensions() * @see _storeDimensions()
*/ */
protected $_dim_rowmin; public $_dim_rowmin;
/** /**
* Last row for the DIMENSIONS record * Last row for the DIMENSIONS record
* @var integer * @var integer
* @see _storeDimensions() * @see _storeDimensions()
*/ */
protected $_dim_rowmax; public $_dim_rowmax;
/** /**
* First column for the DIMENSIONS record * First column for the DIMENSIONS record
* @var integer * @var integer
* @see _storeDimensions() * @see _storeDimensions()
*/ */
protected $_dim_colmin; public $_dim_colmin;
/** /**
* Last column for the DIMENSIONS record * Last column for the DIMENSIONS record
* @var integer * @var integer
* @see _storeDimensions() * @see _storeDimensions()
*/ */
protected $_dim_colmax; public $_dim_colmax;
/** /**
* Array containing format information for columns * Array containing format information for columns
* @var array * @var array
*/ */
protected $_colinfo; public $_colinfo;
/** /**
* Array containing the selected area for the worksheet * Array containing the selected area for the worksheet
* @var array * @var array
*/ */
protected $_selection; public $_selection;
/** /**
* Array containing the panes for the worksheet * Array containing the panes for the worksheet
* @var array * @var array
*/ */
protected $_panes; public $_panes;
/** /**
* The active pane for the worksheet * The active pane for the worksheet
* @var integer * @var integer
*/ */
protected $_active_pane; public $_active_pane;
/** /**
* Bit specifying if panes are frozen * Bit specifying if panes are frozen
* @var integer * @var integer
*/ */
protected $_frozen; public $_frozen;
/** /**
* Bit specifying if the worksheet is selected * Bit specifying if the worksheet is selected
* @var integer * @var integer
*/ */
protected $selected; public $selected;
/** /**
* The paper size (for printing) (DOCUMENT!!!) * The paper size (for printing) (DOCUMENT!!!)
* @var integer * @var integer
*/ */
protected $_paper_size; public $_paper_size;
/** /**
* Bit specifying paper orientation (for printing). 0 => landscape, 1 => portrait * Bit specifying paper orientation (for printing). 0 => landscape, 1 => portrait
* @var integer * @var integer
*/ */
protected $_orientation; public $_orientation;
/** /**
* The page header caption * The page header caption
* @var string * @var string
*/ */
protected $_header; public $_header;
/** /**
* The page footer caption * The page footer caption
* @var string * @var string
*/ */
protected $_footer; public $_footer;
/** /**
* The horizontal centering value for the page * The horizontal centering value for the page
* @var integer * @var integer
*/ */
protected $_hcenter; public $_hcenter;
/** /**
* The vertical centering value for the page * The vertical centering value for the page
* @var integer * @var integer
*/ */
protected $_vcenter; public $_vcenter;
/** /**
* The margin for the header * The margin for the header
* @var float * @var float
*/ */
protected $_margin_head; public $_margin_head;
/** /**
* The margin for the footer * The margin for the footer
* @var float * @var float
*/ */
protected $_margin_foot; public $_margin_foot;
/** /**
* The left margin for the worksheet in inches * The left margin for the worksheet in inches
* @var float * @var float
*/ */
protected $_margin_left; public $_margin_left;
/** /**
* The right margin for the worksheet in inches * The right margin for the worksheet in inches
* @var float * @var float
*/ */
protected $_margin_right; public $_margin_right;
/** /**
* The top margin for the worksheet in inches * The top margin for the worksheet in inches
* @var float * @var float
*/ */
protected $_margin_top; public $_margin_top;
/** /**
* The bottom margin for the worksheet in inches * The bottom margin for the worksheet in inches
* @var float * @var float
*/ */
protected $_margin_bottom; public $_margin_bottom;
/** /**
* First row to reapeat on each printed page * First row to reapeat on each printed page
* @var integer * @var integer
*/ */
protected $title_rowmin; public $title_rowmin;
/** /**
* Last row to reapeat on each printed page * Last row to reapeat on each printed page
* @var integer * @var integer
*/ */
protected $title_rowmax; public $title_rowmax;
/** /**
* First column to reapeat on each printed page * First column to reapeat on each printed page
* @var integer * @var integer
*/ */
protected $title_colmin; public $title_colmin;
/** /**
* First row of the area to print * First row of the area to print
* @var integer * @var integer
*/ */
protected $print_rowmin; public $print_rowmin;
/** /**
* Last row to of the area to print * Last row to of the area to print
* @var integer * @var integer
*/ */
protected $print_rowmax; public $print_rowmax;
/** /**
* First column of the area to print * First column of the area to print
* @var integer * @var integer
*/ */
protected $print_colmin; public $print_colmin;
/** /**
* Last column of the area to print * Last column of the area to print
* @var integer * @var integer
*/ */
protected $print_colmax; public $print_colmax;
/** /**
* Whether to display RightToLeft. * Whether to display RightToLeft.
* @var integer * @var integer
*/ */
protected $_Arabic; public $_Arabic;
/** /**
* Whether to use outline. * Whether to use outline.
* @var integer * @var integer
*/ */
protected $_outline_on; public $_outline_on;
/** /**
* Auto outline styles. * Auto outline styles.
* @var bool * @var bool
*/ */
protected $_outline_style; public $_outline_style;
/** /**
* Whether to have outline summary below. * Whether to have outline summary below.
* @var bool * @var bool
*/ */
protected $_outline_below; public $_outline_below;
/** /**
* Whether to have outline summary at the right. * Whether to have outline summary at the right.
* @var bool * @var bool
*/ */
protected $_outline_right; public $_outline_right;
/** /**
* Outline row level. * Outline row level.
* @var integer * @var integer
*/ */
protected $_outline_row_level; public $_outline_row_level;
/** /**
* Whether to fit to page when printing or not. * Whether to fit to page when printing or not.
* @var bool * @var bool
*/ */
protected $_fit_page; public $_fit_page;
/** /**
* Number of pages to fit wide * Number of pages to fit wide
* @var integer * @var integer
*/ */
protected $_fit_width; public $_fit_width;
/** /**
* Number of pages to fit high * Number of pages to fit high
* @var integer * @var integer
*/ */
protected $_fit_height; public $_fit_height;
/** /**
* Reference to the total number of strings in the workbook * Reference to the total number of strings in the workbook
* @var integer * @var integer
*/ */
protected $_str_total; public $_str_total;
/** /**
* Reference to the number of unique strings in the workbook * Reference to the number of unique strings in the workbook
* @var integer * @var integer
*/ */
protected $_str_unique; public $_str_unique;
/** /**
* Reference to the array containing all the unique strings in the workbook * Reference to the array containing all the unique strings in the workbook
* @var array * @var array
*/ */
protected $_str_table; public $_str_table;
/** /**
* Number of merged cell ranges in actual record * Number of merged cell ranges in actual record
* @var int $_merged_cells_counter * @var int $_merged_cells_counter
*/ */
protected $_merged_cells_counter = 0; public $_merged_cells_counter = 0;
/** /**
* Number of actual mergedcells record * Number of actual mergedcells record
* @var int $_merged_cells_record * @var int $_merged_cells_record
*/ */
protected $_merged_cells_record = 0; public $_merged_cells_record = 0;
/** /**
* Merged cell ranges * Merged cell ranges
* @var array * @var array
*/ */
protected $_merged_ranges; public $_merged_ranges;
/** /**
* Charset encoding currently used when calling writeString() * Charset encoding currently used when calling writeString()
* @var string * @var string
*/ */
protected $_input_encoding; public $_input_encoding;
public $activesheet; public $activesheet;

View File

@ -23,7 +23,8 @@
], ],
"autoload": { "autoload": {
"psr-0": { "psr-0": {
"Spreadsheet": "./" "Spreadsheet": "./",
"Test": "./test"
} }
}, },
"description": "More info available on: http://pear.php.net/package/Spreadsheet_Excel_Writer", "description": "More info available on: http://pear.php.net/package/Spreadsheet_Excel_Writer",

17
phpunit.xml.dist Normal file
View File

@ -0,0 +1,17 @@
<phpunit bootstrap="test/bootstrap.php"
cacheTokens="false"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
stopOnError="false"
stopOnFailure="false"
stopOnIncomplete="false"
stopOnSkipped="false">
<testsuites>
<testsuite name="Test Suite">
<directory>test/</directory>
</testsuite>
</testsuites>
</phpunit>

View File

@ -0,0 +1,17 @@
<?php
/**
* @author stev leibelt <artodeto@bazzline.net>
* @since 2016-01-17
*/
class Test_Spreadsheet_Excel_WriterTestCase extends PHPUnit_Framework_TestCase
{
/**
* @param string $fileName
* @return Spreadsheet_Excel_Writer_Workbook
*/
protected function getNewWorkbook($fileName = 'my_workbook')
{
return new Spreadsheet_Excel_Writer_Workbook($fileName);
}
}

View File

@ -0,0 +1,15 @@
<?php
/**
* @author stev leibelt <artodeto@bazzline.net>
* @since 2016-01-17
*/
class Test_Spreadsheet_Excel_Writer_WorkbookTest extends Test_Spreadsheet_Excel_WriterTestCase
{
public function testSetVersion()
{
$workbook = $this->getNewWorkbook();
$workbook->setVersion(8);
}
}

4
test/bootstrap.php Normal file
View File

@ -0,0 +1,4 @@
<?php
require_once __DIR__ . '/../vendor/autoload.php';
require_once __DIR__ . '/Test/Spreadsheet/Excel/Writer/Test_Spreadsheet_Excel_WriterTestCase.php'; //@todo fix this