PlaintextFormat.php 420 B

1234567891011121314151617181920
  1. <?php
  2. /**
  3. * Plaintext
  4. * Returns $this->items as raw php data.
  5. */
  6. class PlaintextFormat extends FormatAbstract{
  7. public function stringify(){
  8. $datas = $this->getDatas();
  9. return print_r($datas, true);
  10. }
  11. public function display(){
  12. $this
  13. ->setContentType('text/plain;charset=' . $this->getCharset())
  14. ->callContentType();
  15. return parent::display();
  16. }
  17. }