PlaintextFormat.php 440 B

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