using correct names (Spreadsheet_Excel_Writer_blabla) for classes

git-svn-id: https://svn.php.net/repository/pear/packages/Spreadsheet_Excel_Writer/trunk@120530 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Xavier Noguer Gallego 2003-03-18 00:17:36 +00:00
parent 1475ab4b17
commit 2dbecea608
7 changed files with 38 additions and 32 deletions

View File

@ -42,18 +42,18 @@ require_once('Spreadsheet/Excel/Writer/Workbook.php');
* @package Spreadsheet_Excel_Writer
*/
class Spreadsheet_Excel_Writer extends Workbook
class Spreadsheet_Excel_Writer extends Spreadsheet_Excel_Writer_Workbook
{
/**
* The constructor. It just creates a Workbook
*
* @param string $filename The optional filename for the Workbook.
* @return Workbook The Workbook created
* @return Spreadsheet_Excel_Writer_Workbook The Workbook created
*/
function Spreadsheet_Excel_Writer($filename = '')
{
$this->_filename = $filename;
$this->Workbook($filename);
$this->Spreadsheet_Excel_Writer_Workbook($filename);
}
/**

View File

@ -51,7 +51,7 @@ require_once('PEAR.php');
* @package Spreadsheet_Excel_Writer
*/
class BIFFwriter extends PEAR
class Spreadsheet_Excel_Writer_BIFFwriter extends PEAR
{
/**
* The BIFF/Excel version (5).
@ -89,7 +89,7 @@ class BIFFwriter extends PEAR
*
* @access public
*/
function BIFFwriter()
function Spreadsheet_Excel_Writer_BIFFwriter()
{
$this->_byte_order = '';
$this->_data = '';

View File

@ -42,7 +42,7 @@ require_once('PEAR.php');
* @package Spreadsheet_Excel_Writer
*/
class Format extends PEAR
class Spreadsheet_Excel_Writer_Format extends PEAR
{
/**
* The index given by the workbook when creating a new format.
@ -249,7 +249,7 @@ class Format extends PEAR
* @param integer $index the XF index for the format.
* @param array $properties array with properties to be set on initialization.
*/
function Format($index = 0,$properties = array())
function Spreadsheet_Excel_Writer_Format($index = 0,$properties = array())
{
$this->_xf_index = $index;
@ -293,7 +293,7 @@ class Format extends PEAR
$this->_left_color = 0x40;
$this->_right_color = 0x40;
// Set properties passed to Workbook::addFormat()
// Set properties passed to Spreadsheet_Excel_Writer_Workbook::addFormat()
foreach($properties as $property => $value)
{
if(method_exists($this,'set'.ucwords($property)))
@ -431,7 +431,8 @@ class Format extends PEAR
}
/**
* Returns a unique hash key for a font. Used by Workbook->_storeAllFonts()
* Returns a unique hash key for a font.
* Used by Spreadsheet_Excel_Writer_Workbook::_storeAllFonts()
*
* The elements that form the key are arranged to increase the probability of
* generating a unique key. Elements that hold a large range of numbers
@ -451,7 +452,7 @@ class Format extends PEAR
}
/**
* Returns the index used by Worksheet->_XF()
* Returns the index used by Spreadsheet_Excel_Writer_Worksheet::_XF()
*
* @return integer The index for the XF record
*/

View File

@ -42,7 +42,7 @@ require_once('PEAR.php');
* @package Spreadsheet_Excel_Writer
*/
class OLEwriter extends PEAR
class Spreadsheet_Excel_Writer_OLEwriter extends PEAR
{
/**
* Filename for the OLE stream
@ -104,7 +104,7 @@ class OLEwriter extends PEAR
*
* @param string $OLEfilename the name of the file for the OLE stream
*/
function OLEwriter($OLEfilename)
function Spreadsheet_Excel_Writer_OLEwriter($OLEfilename)
{
$this->_OLEfilename = $OLEfilename;
$this->_filehandle = "";
@ -161,7 +161,7 @@ class OLEwriter extends PEAR
* $maxsize = $big_blocks * 512 bytes = 7087104
*
* @access public
* @see Workbook::store_OLE_file()
* @see Spreadsheet_Excel_Writer_Workbook::store_OLE_file()
* @param integer $biffsize The size of the data to be written to the OLE stream
* @return integer 1 for success
*/
@ -212,7 +212,7 @@ class OLEwriter extends PEAR
* having to wait for DESTROY.
*
* @access public
* @see Workbook::store_OLE_file()
* @see Spreadsheet_Excel_Writer_Workbook::store_OLE_file()
*/
function close()
{

View File

@ -98,7 +98,7 @@ require_once('PEAR.php');
* @package Spreadsheet_Excel_Writer
*/
class Parser extends PEAR
class Spreadsheet_Excel_Writer_Parser extends PEAR
{
/**
* The index of the character we are currently looking at
@ -154,7 +154,7 @@ class Parser extends PEAR
* @param integer $byte_order The byte order (Little endian or Big endian) of the architecture
(optional). 1 => big endian, 0 (default) => little endian.
*/
function Parser($byte_order = 0)
function Spreadsheet_Excel_Writer_Parser($byte_order = 0)
{
$this->_current_char = 0;
$this->_current_token = ''; // The token we are working on.
@ -863,7 +863,8 @@ class Parser extends PEAR
/**
* Look up the index that corresponds to an external sheet name. The hash of
* sheet names is updated by the addworksheet() method of the Workbook class.
* sheet names is updated by the addworksheet() method of the
* Spreadsheet_Excel_Writer_Workbook class.
*
* @access private
* @return integer
@ -880,7 +881,7 @@ class Parser extends PEAR
/**
* This method is used to update the array of sheet names. It is
* called by the addWorksheet() method of the Workbook class.
* called by the addWorksheet() method of the Spreadsheet_Excel_Writer_Workbook class.
*
* @access private
* @param string $name The name of the worksheet being added

View File

@ -46,7 +46,7 @@ require_once('Spreadsheet/Excel/Writer/Parser.php');
* @package Spreadsheet_Excel_Writer
*/
class Workbook extends BIFFwriter
class Spreadsheet_Excel_Writer_Workbook extends Spreadsheet_Excel_Writer_BIFFwriter
{
/**
* Filename for the Workbook
@ -152,12 +152,13 @@ class Workbook extends BIFFwriter
* @param string filename for storing the workbook. "-" for writing to stdout.
* @access public
*/
function Workbook($filename)
function Spreadsheet_Excel_Writer_Workbook($filename)
{
$this->BIFFwriter(); // It needs to call its parent's constructor explicitly
// It needs to call its parent's constructor explicitly
$this->Spreadsheet_Excel_Writer_BIFFwriter();
$this->_filename = $filename;
$this->_parser = new Parser($this->_byte_order);
$this->_parser = new Spreadsheet_Excel_Writer_Parser($this->_byte_order);
$this->_1904 = 0;
$this->_activesheet = 0;
$this->_firstsheet = 0;
@ -166,7 +167,7 @@ class Workbook extends BIFFwriter
$this->_fileclosed = 0;
$this->_biffsize = 0;
$this->_sheetname = "Sheet";
$this->_tmp_format =& new Format();
$this->_tmp_format =& new Spreadsheet_Excel_Writer_Format();
$this->_worksheets = array();
$this->_sheetnames = array();
$this->_formats = array();
@ -224,7 +225,7 @@ class Workbook extends BIFFwriter
*
* @access public
* @param string $name the optional name of the worksheet
* @return &Worksheet reference to a worksheet object
* @return &iSpreadsheet_Excel_Writer_Worksheet reference to a worksheet object
*/
function &addWorksheet($name = '')
{
@ -248,7 +249,7 @@ class Workbook extends BIFFwriter
}
}
$worksheet = new Worksheet($name,$index,$this->_activesheet,
$worksheet = new Spreadsheet_Excel_Writer_Worksheet($name,$index,$this->_activesheet,
$this->_firstsheet,$this->_url_format,
$this->_parser);
@ -264,11 +265,11 @@ class Workbook extends BIFFwriter
*
* @access public
* @param array $properties array with properties for initializing the format (see Format.php)
* @return &Format reference to an XF format
* @return &Spreadsheet_Excel_Writer_Format reference to an XF format
*/
function &addFormat($properties = array())
{
$format = new Format($this->_xf_index,$properties);
$format = new Spreadsheet_Excel_Writer_Format($this->_xf_index,$properties);
$this->_xf_index += 1;
$this->_formats[] = &$format;
return($format);
@ -436,7 +437,7 @@ class Workbook extends BIFFwriter
*/
function _storeOLEFile()
{
$OLE = new OLEwriter($this->_filename);
$OLE = new Spreadsheet_Excel_Writer_OLEwriter($this->_filename);
$this->_tmp_filename = $OLE->_tmp_filename;
// Write Worksheet data if data <~ 7MB
if ($OLE->setSize($this->_biffsize))

View File

@ -43,7 +43,7 @@ require_once('Spreadsheet/Excel/Writer/BIFFwriter.php');
* @package Spreadsheet_Excel_Writer
*/
class Worksheet extends BIFFwriter
class Spreadsheet_Excel_Writer_Worksheet extends Spreadsheet_Excel_Writer_BIFFwriter
{
/**
* Name of the Worksheet
@ -293,9 +293,12 @@ class Worksheet extends BIFFwriter
* @param mixed &$url_format The default format for hyperlinks
* @param mixed &$parser The formula parser created for the Workbook
*/
function Worksheet($name, $index, &$activesheet, &$firstsheet, &$url_format, &$parser)
function Spreadsheet_Excel_Writer_Worksheet($name, $index, &$activesheet,
&$firstsheet, &$url_format,
&$parser)
{
$this->BIFFwriter(); // It needs to call its parent's constructor explicitly
// It needs to call its parent's constructor explicitly
$this->Spreadsheet_Excel_Writer_BIFFwriter();
$rowmax = 65536; // 16384 in Excel 5
$colmax = 256;
@ -395,7 +398,7 @@ class Worksheet extends BIFFwriter
* and to the end of the workbook.
*
* @access public
* @see Workbook::storeWorkbook()
* @see Spreadsheet_Excel_Writer_Workbook::storeWorkbook()
* @param array $sheetnames The array of sheetnames from the Workbook this
* worksheet belongs to
*/