Something went wrong. Try again.
@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
Something went wrong. Try again.
1.2 kB · 46 lines
PHP
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647<?php
/** * @phutil-external-symbol class PhpParser\JsonDecoder */final class PhorgePHPASTParseTree extends PhabricatorXHPASTDAO {
protected $authorPHID; protected $input; protected $tree; protected $error; protected $tokenStream;
protected function getConfiguration() { return array( self::CONFIG_SERIALIZATION => array( 'tokenStream' => self::SERIALIZATION_PHP, 'tree' => self::SERIALIZATION_JSON, ), self::CONFIG_BINARY => array( 'tokenStream' => true, ), self::CONFIG_COLUMN_SCHEMA => array( 'authorPHID' => 'phid?', 'error' => 'text?', 'input' => 'text', ), ) + parent::getConfiguration(); }
protected function applyLiskDataSerialization(array &$data, $deserialize) { // applyLiskDataSerialization overwrites $data, so capture the // JSON before it does so. $tree = $data['tree'];
parent::applyLiskDataSerialization($data, $deserialize);
if ($deserialize) { $data['tree'] = id(new PhpParser\JsonDecoder())->decode($tree); } }
public function getTableName() { return 'phpast_parsetree'; }}