1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-09-22 02:08:47 +02:00
phorge-phorge/src/applications/phid/PhabricatorPHIDConstants.php
Ricky Elrod a774620042 Start of a config web interface.
Summary:
This is somewhat clowny, particularly in how it handles JSON encode/decode, but
I've commented why I did things the way I did. The goal is to store minified JSON
but show pretty-printed JSON where possible, to the user editing it.

Test Plan:
* Went to /config/ and saw a list of keys from the `default` config.
* Clicked on one of them, submitted the default value successfully.
* Changed the value to invalid JSON and got a decent error.
* Changed the value to valid JSON and checked the DB to confirm it saved.
* Confirmed the DB values were minified.
* Confirmed the user-facing values were pretty-printed where they could be.
* Confirmed that PHIDs were getting assigned properly and that isDeleted
  properly defaulted to false/0.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T2246

Differential Revision: https://secure.phabricator.com/D4290
2012-12-27 15:21:21 -08:00

38 lines
1.1 KiB
PHP

<?php
final class PhabricatorPHIDConstants {
const PHID_TYPE_USER = 'USER';
const PHID_TYPE_MLST = 'MLST';
const PHID_TYPE_DREV = 'DREV';
const PHID_TYPE_TASK = 'TASK';
const PHID_TYPE_FILE = 'FILE';
const PHID_TYPE_PROJ = 'PROJ';
const PHID_TYPE_UNKNOWN = '????';
const PHID_TYPE_MAGIC = '!!!!';
const PHID_TYPE_REPO = 'REPO';
const PHID_TYPE_CMIT = 'CMIT';
const PHID_TYPE_OPKG = 'OPKG';
const PHID_TYPE_PSTE = 'PSTE';
const PHID_TYPE_STRY = 'STRY';
const PHID_TYPE_POLL = 'POLL';
const PHID_TYPE_WIKI = 'WIKI';
const PHID_TYPE_APRJ = 'APRJ';
const PHID_TYPE_ACMT = 'ACMT';
const PHID_TYPE_DRYR = 'DRYR';
const PHID_TYPE_DRYL = 'DRYL';
const PHID_TYPE_OASC = 'OASC';
const PHID_TYPE_OASA = 'OASA';
const PHID_TYPE_POST = 'POST';
const PHID_TYPE_TOBJ = 'TOBJ';
const PHID_TYPE_BLOG = 'BLOG';
const PHID_TYPE_QUES = 'QUES';
const PHID_TYPE_ANSW = 'ANSW';
const PHID_TYPE_MOCK = 'MOCK';
const PHID_TYPE_MCRO = 'MCRO';
const PHID_TYPE_CONF = 'CONF';
const PHID_TYPE_XACT = 'XACT';
const PHID_TYPE_XCMT = 'XCMT';
}