File dsl/standard/Writer.class.php

Last commit: Thu Dec 26 12:12:43 2024 +0100	Jan Dankert	The last update from upstream repository openrat-cms.
1 <?php 2 3 namespace dsl\standard; 4 5 class Writer 6 { 7 public $buffer; 8 9 /** 10 * Write something to an output queue. 11 * 12 * @param $text 13 */ 14 public function __invoke( $text ) 15 { 16 if ( is_object($text ) && !method_exists($text, '__toString') ) 17 // Workaround for external objects, that do not implement __toString() 18 $this->buffer .= get_class($text); 19 elseif ( is_array($text) ) 20 $this->buffer .= '['.implode(',',$text).']'; 21 else 22 $this->buffer .= $text; 23 } 24 }
Download dsl/standard/Writer.class.php
History Thu, 26 Dec 2024 12:12:43 +0100 Jan Dankert The last update from upstream repository openrat-cms.