Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 0.9.4

Request #4665 Support for extended classes
Submitted: 2005-06-23 07:38 UTC
From: dan at yes dot lt Assigned:
Status: Verified Package: Spreadsheet_Excel_Writer
PHP Version: Irrelevant OS:
Roadmaps: (Not assigned)    
Subscription  
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes. If this is not your bug, you can add a comment by following this link. If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
2009-08-12 03:45 UTC
Package:
Bug Type:
Summary:
From: dan at yes dot lt
New email:
PHP Version: Package Version: OS:

 

 [2005-06-23 07:38 UTC] dan at yes dot lt
Description: ------------ Now when extending Spreadsheet_Excel_Writer_Workbook class there is no way to return extended classes for *_Worksheet, *_Format, etc. from ->addWorksheet(), ->addFormat(), etc... I sudgest to add additional parameter for those methods - $className: < function &addWorksheet($name = '') > function &addWorksheet($name = '', $className = '') < function &addFormat($properties = array()) > function &addFormat($properties = array(), $className = '') ... And then reimplement thouse methods to support different classes: < $worksheet = new Spreadsheet_Excel_Writer_Worksheet(... > if (! class_exists($className)) { > $className = 'Spreadsheet_Excel_Writer_Worksheet'; > } > $worksheet = new $className(... > if (! is_a($worksheet, 'Spreadsheet_Excel_Writer_Worksheet')) { > $this->raiseError('Custom class do not extends Spreadsheet_Excel_Writer_Worksheet', 0, PEAR_ERROR_DIE); > } ...and the same for all other classes.

Comments

 [2009-08-12 03:45 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!