From d2bf11ae395a2f3538c6d0ef670d26ee84baece6 Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Tue, 8 Apr 2008 13:40:34 -0400 Subject: [PATCH] Add a __toString() method on BSPrinterAbstract * PrinterAbstract.php: (BSPrinterAbstract::__toString): New method that calls paint() --- CHANGES | 1 + PrinterAbstract.php | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/CHANGES b/CHANGES index 32e7941..690c3d6 100644 --- a/CHANGES +++ b/CHANGES @@ -6,3 +6,4 @@ - New: BSPrinterAbstract::setId() allows all elements to have an id attribute added in _prepareStyle() - New: Added an ability to quick-set API information via an array with BSApi::setArray() - New: Made many private members protected or public +- Change: Added BSPrinterAbstract::__toString() that merely calls paint() diff --git a/PrinterAbstract.php b/PrinterAbstract.php index 08a91ab..dddabe2 100644 --- a/PrinterAbstract.php +++ b/PrinterAbstract.php @@ -66,6 +66,14 @@ abstract class BSPrinterAbstract */ public abstract function paint(); + /** + * To-string method which invokes paint() + */ + public function __toString() + { + return $this->paint(); + } + /** * Sets the CSS class to use. Use ":swap:" to alternate * -- 2.43.5