From: Robert Sesek Date: Tue, 8 Apr 2008 17:40:34 +0000 (-0400) Subject: Add a __toString() method on BSPrinterAbstract X-Git-Tag: 3.1.0~11 X-Git-Url: https://src.bluestatic.org/?a=commitdiff_plain;h=d2bf11ae395a2f3538c6d0ef670d26ee84baece6;p=isso.git Add a __toString() method on BSPrinterAbstract * PrinterAbstract.php: (BSPrinterAbstract::__toString): New method that calls paint() --- 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 *