Php.class.php 537 B

12345678910111213141516171819202122232425262728
  1. <?php
  2. class Php extends Readme {
  3. public static function manifest(){
  4. return array(
  5. 'uid' => 'php',
  6. 'label' => 'PHP',
  7. 'description' => 'Fichier PHP',
  8. 'fromExtension' => array('php','phar'),
  9. 'toExtension' => 'php'
  10. );
  11. }
  12. public static function toHtml($resource,$sketch){
  13. $infos = self::manifest();
  14. return array(
  15. 'content'=>'<textarea>'.$resource->content.'</textarea>',
  16. 'codemirror' => array(
  17. 'mode'=>'php',
  18. 'theme'=>'monokai',
  19. 'lineNumbers' => true,
  20. 'readOnly' => false
  21. )
  22. );
  23. }
  24. }
  25. ?>