[ Index ] |
PHP Cross Reference of Phabricator |
[Summary view] [Print] [Text view]
1 <?php 2 3 abstract class PhabricatorXHPASTViewPanelController 4 extends PhabricatorXHPASTViewController { 5 6 private $id; 7 private $storageTree; 8 9 public function willProcessRequest(array $data) { 10 $this->id = $data['id']; 11 $this->storageTree = id(new PhabricatorXHPASTViewParseTree()) 12 ->load($this->id); 13 if (!$this->storageTree) { 14 throw new Exception('No such AST!'); 15 } 16 } 17 18 protected function getStorageTree() { 19 return $this->storageTree; 20 } 21 22 protected function buildXHPASTViewPanelResponse($content) { 23 $content = hsprintf( 24 '<!DOCTYPE html>'. 25 '<html>'. 26 '<head>'. 27 '<style type="text/css"> 28 body { 29 white-space: pre; 30 font: 10px "Monaco"; 31 cursor: pointer; 32 } 33 34 .token { 35 padding: 2px 4px; 36 margin: 2px 2px; 37 border: 1px solid #bbbbbb; 38 line-height: 24px; 39 } 40 41 ul { 42 margin: 0 0 0 1em; 43 padding: 0; 44 list-style: none; 45 line-height: 1em; 46 } 47 48 li { 49 margin: 0; 50 padding: 0; 51 } 52 53 li span { 54 background: #dddddd; 55 padding: 3px 6px; 56 } 57 58 </style>'. 59 '</head>'. 60 '<body>%s</body>'. 61 '</html>', 62 $content); 63 64 $response = new AphrontWebpageResponse(); 65 $response->setFrameable(true); 66 $response->setContent($content); 67 return $response; 68 } 69 70 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Sun Nov 30 09:20:46 2014 | Cross-referenced by PHPXref 0.7.1 |