repo stringlengths 7 63 | file_url stringlengths 81 284 | file_path stringlengths 5 200 | content stringlengths 0 32.8k | language stringclasses 1
value | license stringclasses 7
values | commit_sha stringlengths 40 40 | retrieved_at stringdate 2026-01-04 15:02:33 2026-01-05 05:24:06 | truncated bool 2
classes |
|---|---|---|---|---|---|---|---|---|
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/infrastructure/daemon/workers/exception/PhabricatorWorkerYieldException.php | src/infrastructure/daemon/workers/exception/PhabricatorWorkerYieldException.php | <?php
/**
* Allows tasks to yield to other tasks.
*
* If a worker throws this exception while processing a task, the task will be
* pushed toward the back of the queue and tried again later.
*/
final class PhabricatorWorkerYieldException extends Exception {
private $duration;
public function __construct($du... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/infrastructure/daemon/workers/exception/PhabricatorWorkerPermanentFailureException.php | src/infrastructure/daemon/workers/exception/PhabricatorWorkerPermanentFailureException.php | <?php
final class PhabricatorWorkerPermanentFailureException extends Exception {}
| php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/infrastructure/daemon/workers/__tests__/PhabricatorTestWorker.php | src/infrastructure/daemon/workers/__tests__/PhabricatorTestWorker.php | <?php
final class PhabricatorTestWorker extends PhabricatorWorker {
public function getRequiredLeaseTime() {
return idx(
$this->getTaskData(),
'getRequiredLeaseTime',
parent::getRequiredLeaseTime());
}
public function getMaximumRetryCount() {
return idx(
$this->getTaskData(),
... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/infrastructure/daemon/workers/__tests__/PhabricatorWorkerBulkJobTestCase.php | src/infrastructure/daemon/workers/__tests__/PhabricatorWorkerBulkJobTestCase.php | <?php
final class PhabricatorWorkerBulkJobTestCase extends PhabricatorTestCase {
public function testGetAllBulkJobTypes() {
PhabricatorWorkerBulkJobType::getAllJobTypes();
$this->assertTrue(true);
}
}
| php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/infrastructure/daemon/workers/__tests__/PhabricatorWorkerTestCase.php | src/infrastructure/daemon/workers/__tests__/PhabricatorWorkerTestCase.php | <?php
final class PhabricatorWorkerTestCase extends PhabricatorTestCase {
protected function getPhabricatorTestCaseConfiguration() {
return array(
self::PHABRICATOR_TESTCONFIG_BUILD_STORAGE_FIXTURES => true,
);
}
protected function willRunOneTest($test) {
parent::willRunOneTest($test);
/... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/infrastructure/daemon/workers/phid/PhabricatorWorkerTriggerPHIDType.php | src/infrastructure/daemon/workers/phid/PhabricatorWorkerTriggerPHIDType.php | <?php
final class PhabricatorWorkerTriggerPHIDType extends PhabricatorPHIDType {
const TYPECONST = 'TRIG';
public function getTypeName() {
return pht('Trigger');
}
public function newObject() {
return new PhabricatorWorkerTrigger();
}
public function getPHIDTypeApplicationClass() {
return '... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/infrastructure/daemon/workers/phid/PhabricatorWorkerBulkJobPHIDType.php | src/infrastructure/daemon/workers/phid/PhabricatorWorkerBulkJobPHIDType.php | <?php
final class PhabricatorWorkerBulkJobPHIDType extends PhabricatorPHIDType {
const TYPECONST = 'BULK';
public function getTypeName() {
return pht('Bulk Job');
}
public function newObject() {
return new PhabricatorWorkerBulkJob();
}
public function getPHIDTypeApplicationClass() {
return ... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/infrastructure/daemon/workers/clock/PhabricatorTriggerClock.php | src/infrastructure/daemon/workers/clock/PhabricatorTriggerClock.php | <?php
/**
* A trigger clock implements scheduling rules for an event.
*
* Two examples of triggered events are a subscription which bills on the 12th
* of every month, or a meeting reminder which sends an email 15 minutes before
* an event. A trigger clock contains the logic to figure out exactly when
* those ti... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/infrastructure/daemon/workers/clock/PhabricatorSubscriptionTriggerClock.php | src/infrastructure/daemon/workers/clock/PhabricatorSubscriptionTriggerClock.php | <?php
/**
* Triggers an event every month on the same day of the month, like the 12th
* of the month.
*
* If a given month does not have such a day (for instance, the clock triggers
* on the 30th of each month and the month in question is February, which never
* has a 30th day), it will trigger on the last day o... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/infrastructure/daemon/workers/clock/PhabricatorNeverTriggerClock.php | src/infrastructure/daemon/workers/clock/PhabricatorNeverTriggerClock.php | <?php
/**
* Never triggers an event.
*
* This clock can be used for testing, or to cancel events.
*/
final class PhabricatorNeverTriggerClock extends PhabricatorTriggerClock {
public function validateProperties(array $properties) {
PhutilTypeSpec::checkMap(
$properties,
array());
}
public f... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/infrastructure/daemon/workers/clock/PhabricatorOneTimeTriggerClock.php | src/infrastructure/daemon/workers/clock/PhabricatorOneTimeTriggerClock.php | <?php
/**
* Triggers an event exactly once, at a specific epoch time.
*/
final class PhabricatorOneTimeTriggerClock
extends PhabricatorTriggerClock {
public function validateProperties(array $properties) {
PhutilTypeSpec::checkMap(
$properties,
array(
'epoch' => 'int',
));
}
p... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/infrastructure/daemon/workers/clock/PhabricatorMetronomicTriggerClock.php | src/infrastructure/daemon/workers/clock/PhabricatorMetronomicTriggerClock.php | <?php
/**
* Triggers an event repeatedly, delaying a fixed number of seconds between
* triggers.
*
* For example, this clock can trigger an event every 30 seconds.
*/
final class PhabricatorMetronomicTriggerClock extends PhabricatorTriggerClock {
public function validateProperties(array $properties) {
Phut... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/infrastructure/daemon/workers/clock/PhabricatorDailyRoutineTriggerClock.php | src/infrastructure/daemon/workers/clock/PhabricatorDailyRoutineTriggerClock.php | <?php
/**
* Triggers a daily routine, like server backups.
*
* This clock triggers events every 24 hours, using UTC. It does not use a
* locale, and is intended for technical processes like backing up a server
* every night.
*
* Because UTC does not have daylight savings, the local hour when this event
* occur... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/infrastructure/daemon/workers/clock/__tests__/PhabricatorTriggerClockTestCase.php | src/infrastructure/daemon/workers/clock/__tests__/PhabricatorTriggerClockTestCase.php | <?php
final class PhabricatorTriggerClockTestCase extends PhabricatorTestCase {
public function testOneTimeTriggerClock() {
$now = PhabricatorTime::getNow();
$clock = new PhabricatorOneTimeTriggerClock(
array(
'epoch' => $now,
));
$this->assertEqual(
$now,
$clock->getNe... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/infrastructure/daemon/contentsource/PhabricatorDaemonContentSource.php | src/infrastructure/daemon/contentsource/PhabricatorDaemonContentSource.php | <?php
final class PhabricatorDaemonContentSource
extends PhabricatorContentSource {
const SOURCECONST = 'daemon';
public function getSourceName() {
return pht('Daemon');
}
public function getSourceDescription() {
return pht('Updates from background processing in daemons.');
}
}
| php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/infrastructure/daemon/contentsource/PhabricatorBulkContentSource.php | src/infrastructure/daemon/contentsource/PhabricatorBulkContentSource.php | <?php
final class PhabricatorBulkContentSource
extends PhabricatorContentSource {
const SOURCECONST = 'bulk';
public function getSourceName() {
return pht('Bulk Update');
}
public function getSourceDescription() {
return pht('Changes made by bulk update.');
}
}
| php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/infrastructure/daemon/overseer/PhabricatorDaemonOverseerModule.php | src/infrastructure/daemon/overseer/PhabricatorDaemonOverseerModule.php | <?php
/**
* Overseer module.
*
* The primary purpose of this overseer module is to poll for configuration
* changes and reload daemons when the configuration changes.
*/
final class PhabricatorDaemonOverseerModule
extends PhutilDaemonOverseerModule {
private $configVersion;
public function shouldReloadDae... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/infrastructure/daemon/garbagecollector/PhabricatorGarbageCollector.php | src/infrastructure/daemon/garbagecollector/PhabricatorGarbageCollector.php | <?php
/**
* @task info Getting Collector Information
* @task collect Collecting Garbage
*/
abstract class PhabricatorGarbageCollector extends Phobject {
/* -( Getting Collector Information )-------------------------------------- */
/**
* Get a human readable name for what this collector cleans up, like
... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/infrastructure/daemon/garbagecollector/management/PhabricatorGarbageCollectorManagementCollectWorkflow.php | src/infrastructure/daemon/garbagecollector/management/PhabricatorGarbageCollectorManagementCollectWorkflow.php | <?php
final class PhabricatorGarbageCollectorManagementCollectWorkflow
extends PhabricatorGarbageCollectorManagementWorkflow {
protected function didConstruct() {
$this
->setName('collect')
->setExamples('**collect** --collector __collector__')
->setSynopsis(
pht('Run a garbage colle... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/infrastructure/daemon/garbagecollector/management/PhabricatorGarbageCollectorManagementSetPolicyWorkflow.php | src/infrastructure/daemon/garbagecollector/management/PhabricatorGarbageCollectorManagementSetPolicyWorkflow.php | <?php
final class PhabricatorGarbageCollectorManagementSetPolicyWorkflow
extends PhabricatorGarbageCollectorManagementWorkflow {
protected function didConstruct() {
$this
->setName('set-policy')
->setExamples(
"**set-policy** --collector __collector__ --days 30\n".
"**set-policy** ... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/infrastructure/daemon/garbagecollector/management/PhabricatorGarbageCollectorManagementCompactEdgesWorkflow.php | src/infrastructure/daemon/garbagecollector/management/PhabricatorGarbageCollectorManagementCompactEdgesWorkflow.php | <?php
final class PhabricatorGarbageCollectorManagementCompactEdgesWorkflow
extends PhabricatorGarbageCollectorManagementWorkflow {
protected function didConstruct() {
$this
->setName('compact-edges')
->setExamples('**compact-edges**')
->setSynopsis(
pht(
'Rebuild old edge ... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/infrastructure/daemon/garbagecollector/management/PhabricatorGarbageCollectorManagementWorkflow.php | src/infrastructure/daemon/garbagecollector/management/PhabricatorGarbageCollectorManagementWorkflow.php | <?php
abstract class PhabricatorGarbageCollectorManagementWorkflow
extends PhabricatorManagementWorkflow {
protected function getCollector($const) {
$collectors = PhabricatorGarbageCollector::getAllCollectors();
$collector_list = array_keys($collectors);
sort($collector_list);
$collector_list = i... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/infrastructure/daemon/control/PhabricatorDaemonReference.php | src/infrastructure/daemon/control/PhabricatorDaemonReference.php | <?php
// TODO: See T13321. After the removal of daemon PID files this class
// no longer makes as much sense as it once did.
final class PhabricatorDaemonReference extends Phobject {
public static function isProcessRunning($pid) {
if (!$pid) {
return false;
}
if (function_exists('posix_kill')) {... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/infrastructure/javelin/markup.php | src/infrastructure/javelin/markup.php | <?php
function javelin_tag(
$tag,
array $attributes = array(),
$content = null) {
if (isset($attributes['sigil']) ||
isset($attributes['meta']) ||
isset($attributes['mustcapture'])) {
foreach ($attributes as $k => $v) {
switch ($k) {
case 'sigil':
if ($v !== null) {
... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/infrastructure/javelin/Javelin.php | src/infrastructure/javelin/Javelin.php | <?php
final class Javelin extends Phobject {
public static function initBehavior(
$behavior,
array $config = array(),
$source_name = 'phabricator') {
$response = CelerityAPI::getStaticResourceResponse();
$response->initBehavior($behavior, $config, $source_name);
}
}
| php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/infrastructure/parser/PhutilPygmentizeParser.php | src/infrastructure/parser/PhutilPygmentizeParser.php | <?php
/**
* Parser that converts `pygmetize` output or similar HTML blocks from "class"
* attributes to "style" attributes.
*/
final class PhutilPygmentizeParser extends Phobject {
private $map = array();
public function setMap(array $map) {
$this->map = $map;
return $this;
}
public function getM... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/infrastructure/parser/__tests__/PhutilPygmentizeParserTestCase.php | src/infrastructure/parser/__tests__/PhutilPygmentizeParserTestCase.php | <?php
final class PhutilPygmentizeParserTestCase extends PhutilTestCase {
public function testPygmentizeParser() {
$this->tryParser(
'',
'',
array(),
pht('Empty'));
$this->tryParser(
'<span class="mi">1</span>',
'<span style="color: #ff0000">1</span>',
array(
... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/infrastructure/markup/render.php | src/infrastructure/markup/render.php | <?php
/**
* Render an HTML tag in a way that treats user content as unsafe by default.
*
* Tag rendering has some special logic which implements security features:
*
* - When rendering `<a>` tags, if the `rel` attribute is not specified, it
* is interpreted as `rel="noreferrer"`.
* - When rendering `<a>... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/infrastructure/markup/PhutilRemarkupBlockStorage.php | src/infrastructure/markup/PhutilRemarkupBlockStorage.php | <?php
/**
* Remarkup prevents several classes of text-processing problems by replacing
* tokens in the text as they are marked up. For example, if you write something
* like this:
*
* //D12//
*
* It is processed in several stages. First the "D12" matches and is replaced
* with a token, in the form of "<0x01>... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/infrastructure/markup/PhabricatorMarkupOneOff.php | src/infrastructure/markup/PhabricatorMarkupOneOff.php | <?php
/**
* DEPRECATED. Use @{class:PHUIRemarkupView}.
*/
final class PhabricatorMarkupOneOff
extends Phobject
implements PhabricatorMarkupInterface {
private $content;
private $preserveLinebreaks;
private $engineRuleset;
private $engine;
private $disableCache;
private $contentCacheFragment;
priv... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/infrastructure/markup/PhutilSafeHTMLProducerInterface.php | src/infrastructure/markup/PhutilSafeHTMLProducerInterface.php | <?php
/**
* Implement this interface to mark an object as capable of producing a
* PhutilSafeHTML representation. This is primarily useful for building
* renderable HTML views.
*/
interface PhutilSafeHTMLProducerInterface {
public function producePhutilSafeHTML();
}
| php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/infrastructure/markup/PhabricatorMarkupInterface.php | src/infrastructure/markup/PhabricatorMarkupInterface.php | <?php
/**
* An object which has one or more fields containing markup that can be
* rendered into a display format. Commonly, the fields contain Remarkup and
* are rendered into HTML. Implementing this interface allows you to render
* objects through @{class:PhabricatorMarkupEngine} and benefit from caching
* and ... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/infrastructure/markup/PhabricatorSyntaxHighlighter.php | src/infrastructure/markup/PhabricatorSyntaxHighlighter.php | <?php
final class PhabricatorSyntaxHighlighter extends Phobject {
public static function newEngine() {
$engine = PhabricatorEnv::newObjectFromConfig('syntax-highlighter.engine');
$config = array(
'pygments.enabled' => PhabricatorEnv::getEnvConfig('pygments.enabled'),
'filename.map' => Phabr... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/infrastructure/markup/PhutilSafeHTML.php | src/infrastructure/markup/PhutilSafeHTML.php | <?php
final class PhutilSafeHTML extends Phobject {
private $content;
public function __construct($content) {
$this->content = (string)$content;
}
public function __toString() {
return $this->content;
}
public function getHTMLContent() {
return $this->content;
}
public function appendH... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/infrastructure/markup/PhabricatorMarkupEngine.php | src/infrastructure/markup/PhabricatorMarkupEngine.php | <?php
/**
* Manages markup engine selection, configuration, application, caching and
* pipelining.
*
* @{class:PhabricatorMarkupEngine} can be used to render objects which
* implement @{interface:PhabricatorMarkupInterface} in a batched, cache-aware
* way. For example, if you have a list of comments written in r... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/infrastructure/markup/PhutilMarkupEngine.php | src/infrastructure/markup/PhutilMarkupEngine.php | <?php
abstract class PhutilMarkupEngine extends Phobject {
/**
* Set a configuration parameter which the engine can read to customize how
* the text is marked up. This is a generic interface; consult the
* documentation for specific rules and blocks for what options are available
* for configuration.
... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/infrastructure/markup/PhabricatorMarkupPreviewController.php | src/infrastructure/markup/PhabricatorMarkupPreviewController.php | <?php
final class PhabricatorMarkupPreviewController
extends PhabricatorController {
public function processRequest() {
$request = $this->getRequest();
$viewer = $request->getUser();
$text = $request->getStr('text');
$output = PhabricatorMarkupEngine::renderOneObject(
id(new PhabricatorMar... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/infrastructure/markup/rule/PhabricatorNavigationRemarkupRule.php | src/infrastructure/markup/rule/PhabricatorNavigationRemarkupRule.php | <?php
final class PhabricatorNavigationRemarkupRule extends PhutilRemarkupRule {
public function getPriority() {
return 200.0;
}
public function apply($text) {
return preg_replace_callback(
'@{nav\b((?:[^}\\\\]+|\\\\.)*)}@m',
array($this, 'markupNavigation'),
$text);
}
public fun... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/infrastructure/markup/rule/PhabricatorObjectRemarkupRule.php | src/infrastructure/markup/rule/PhabricatorObjectRemarkupRule.php | <?php
abstract class PhabricatorObjectRemarkupRule extends PhutilRemarkupRule {
private $referencePattern;
private $embedPattern;
const KEY_RULE_OBJECT = 'rule.object';
const KEY_MENTIONED_OBJECTS = 'rule.object.mentioned';
abstract protected function getObjectNamePrefix();
abstract protected function l... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/infrastructure/markup/rule/PhabricatorRemarkupCustomBlockRule.php | src/infrastructure/markup/rule/PhabricatorRemarkupCustomBlockRule.php | <?php
abstract class PhabricatorRemarkupCustomBlockRule
extends PhutilRemarkupBlockRule {
public function getRuleVersion() {
return 1;
}
}
| php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/infrastructure/markup/rule/PhabricatorRemarkupCustomInlineRule.php | src/infrastructure/markup/rule/PhabricatorRemarkupCustomInlineRule.php | <?php
abstract class PhabricatorRemarkupCustomInlineRule extends PhutilRemarkupRule {
public function getRuleVersion() {
return 1;
}
}
| php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/infrastructure/markup/rule/PhabricatorYoutubeRemarkupRule.php | src/infrastructure/markup/rule/PhabricatorYoutubeRemarkupRule.php | <?php
final class PhabricatorYoutubeRemarkupRule extends PhutilRemarkupRule {
public function getPriority() {
return 350.0;
}
public function apply($text) {
try {
$uri = new PhutilURI($text);
} catch (Exception $ex) {
return $text;
}
$domain = $uri->getDomain();
if (!preg_m... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/infrastructure/markup/rule/PhabricatorKeyboardRemarkupRule.php | src/infrastructure/markup/rule/PhabricatorKeyboardRemarkupRule.php | <?php
final class PhabricatorKeyboardRemarkupRule extends PhutilRemarkupRule {
public function getPriority() {
return 200.0;
}
public function apply($text) {
return preg_replace_callback(
'@{key\b((?:[^}\\\\]+|\\\\.)*)}@m',
array($this, 'markupKeystrokes'),
$text);
}
public funct... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/infrastructure/markup/rule/PhabricatorConfigRemarkupRule.php | src/infrastructure/markup/rule/PhabricatorConfigRemarkupRule.php | <?php
final class PhabricatorConfigRemarkupRule
extends PhutilRemarkupRule {
public function apply($text) {
return preg_replace_callback(
'(@{config:([^}]+)})',
array($this, 'markupConfig'),
$text);
}
public function getPriority() {
// We're reusing the Diviner atom syntax, so make ... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/infrastructure/markup/__tests__/PhabricatorMarkupEngineTestCase.php | src/infrastructure/markup/__tests__/PhabricatorMarkupEngineTestCase.php | <?php
final class PhabricatorMarkupEngineTestCase
extends PhabricatorTestCase {
public function testRemarkupSentenceSummmaries() {
$this->assertSentenceSummary(
'The quick brown fox. Jumped over the lazy dog.',
'The quick brown fox.');
$this->assertSentenceSummary(
'Go to www.help.com f... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/infrastructure/markup/__tests__/PhutilTranslatedHTMLTestCase.php | src/infrastructure/markup/__tests__/PhutilTranslatedHTMLTestCase.php | <?php
final class PhutilTranslatedHTMLTestCase extends PhutilTestCase {
public function testHTMLTranslations() {
$string = '%s awoke <strong>suddenly</strong> at %s.';
$when = '<4 AM>';
$translator = $this->newTranslator('en_US');
// When no components are HTML, everything is treated as a string.
... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/infrastructure/markup/__tests__/PhabricatorAnchorTestCase.php | src/infrastructure/markup/__tests__/PhabricatorAnchorTestCase.php | <?php
final class PhabricatorAnchorTestCase
extends PhabricatorTestCase {
public function testAnchors() {
$low_ascii = '';
for ($ii = 19; $ii <= 127; $ii++) {
$low_ascii .= chr($ii);
}
$snowman = "\xE2\x9B\x84";
$map = array(
'' => '',
'Bells and Whistles' => 'bells-and-wh... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/infrastructure/markup/__tests__/PhutilSafeHTMLTestCase.php | src/infrastructure/markup/__tests__/PhutilSafeHTMLTestCase.php | <?php
final class PhutilSafeHTMLTestCase extends PhutilTestCase {
public function testOperator() {
if (!extension_loaded('operator')) {
$this->assertSkipped(pht('Operator extension not available.'));
}
$a = phutil_tag('a');
$ab = $a.phutil_tag('b');
$this->assertEqual('<a></a><b></b>', $a... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/infrastructure/markup/__tests__/PhutilMarkupTestCase.php | src/infrastructure/markup/__tests__/PhutilMarkupTestCase.php | <?php
final class PhutilMarkupTestCase extends PhutilTestCase {
public function testTagDefaults() {
$this->assertEqual(
(string)phutil_tag('br'),
(string)phutil_tag('br', array()));
$this->assertEqual(
(string)phutil_tag('br', array()),
(string)phutil_tag('br', array(), null));
}
... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/infrastructure/markup/markuprule/PhutilRemarkupDelRule.php | src/infrastructure/markup/markuprule/PhutilRemarkupDelRule.php | <?php
final class PhutilRemarkupDelRule extends PhutilRemarkupRule {
public function getPriority() {
return 1000.0;
}
public function apply($text) {
if ($this->getEngine()->isTextMode()) {
return $text;
}
return $this->replaceHTML(
'@(?<!~)~~([^\s~].*?~*)~~@s',
array($this, '... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/infrastructure/markup/markuprule/PhutilRemarkupRule.php | src/infrastructure/markup/markuprule/PhutilRemarkupRule.php | <?php
abstract class PhutilRemarkupRule extends Phobject {
private $engine;
private $replaceCallback;
public function setEngine(PhutilRemarkupEngine $engine) {
$this->engine = $engine;
return $this;
}
public function getEngine() {
return $this->engine;
}
public function getPriority() {
... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/infrastructure/markup/markuprule/PhutilRemarkupHyperlinkRef.php | src/infrastructure/markup/markuprule/PhutilRemarkupHyperlinkRef.php | <?php
final class PhutilRemarkupHyperlinkRef
extends Phobject {
private $token;
private $uri;
private $embed;
private $result;
public function __construct(array $map) {
$this->token = $map['token'];
$this->uri = $map['uri'];
$this->embed = ($map['mode'] === '{');
}
public function getTok... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/infrastructure/markup/markuprule/PhutilRemarkupHyperlinkRule.php | src/infrastructure/markup/markuprule/PhutilRemarkupHyperlinkRule.php | <?php
final class PhutilRemarkupHyperlinkRule extends PhutilRemarkupRule {
const KEY_HYPERLINKS = 'hyperlinks';
public function getPriority() {
return 400.0;
}
public function apply($text) {
static $angle_pattern;
static $curly_pattern;
static $bare_pattern;
if ($angle_pattern === null)... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/infrastructure/markup/markuprule/PhutilRemarkupUnderlineRule.php | src/infrastructure/markup/markuprule/PhutilRemarkupUnderlineRule.php | <?php
final class PhutilRemarkupUnderlineRule extends PhutilRemarkupRule {
public function getPriority() {
return 1000.0;
}
public function apply($text) {
if ($this->getEngine()->isTextMode()) {
return $text;
}
return $this->replaceHTML(
'@(?<!_|/)__([^\s_/].*?_*)__(?!/|\.\S)@s',
... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/infrastructure/markup/markuprule/PhutilRemarkupHighlightRule.php | src/infrastructure/markup/markuprule/PhutilRemarkupHighlightRule.php | <?php
final class PhutilRemarkupHighlightRule extends PhutilRemarkupRule {
public function getPriority() {
return 1000.0;
}
public function apply($text) {
if ($this->getEngine()->isTextMode()) {
return $text;
}
return $this->replaceHTML(
'@!!(.+?)(!{2,})@',
array($this, 'appl... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/infrastructure/markup/markuprule/PhutilRemarkupMonospaceRule.php | src/infrastructure/markup/markuprule/PhutilRemarkupMonospaceRule.php | <?php
final class PhutilRemarkupMonospaceRule extends PhutilRemarkupRule {
public function getPriority() {
return 100.0;
}
public function apply($text) {
// NOTE: We don't require a trailing non-boundary on the backtick syntax,
// to permit the use case of naming and pluralizing a class, like
/... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/infrastructure/markup/markuprule/PhutilRemarkupEvalRule.php | src/infrastructure/markup/markuprule/PhutilRemarkupEvalRule.php | <?php
final class PhutilRemarkupEvalRule extends PhutilRemarkupRule {
const KEY_EVAL = 'eval';
public function getPriority() {
return 50;
}
public function apply($text) {
return preg_replace_callback(
'/\${{{(.+?)}}}/',
array($this, 'newExpressionToken'),
$text);
}
public func... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/infrastructure/markup/markuprule/PhutilRemarkupBoldRule.php | src/infrastructure/markup/markuprule/PhutilRemarkupBoldRule.php | <?php
final class PhutilRemarkupBoldRule extends PhutilRemarkupRule {
public function getPriority() {
return 1000.0;
}
public function apply($text) {
if ($this->getEngine()->isTextMode()) {
return $text;
}
return $this->replaceHTML(
'@\\*\\*(.+?)\\*\\*@s',
array($this, 'apply... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/infrastructure/markup/markuprule/PhutilRemarkupLinebreaksRule.php | src/infrastructure/markup/markuprule/PhutilRemarkupLinebreaksRule.php | <?php
final class PhutilRemarkupLinebreaksRule extends PhutilRemarkupRule {
public function apply($text) {
if ($this->getEngine()->isTextMode()) {
return $text;
}
return phutil_escape_html_newlines($text);
}
}
| php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/infrastructure/markup/markuprule/PhutilRemarkupAnchorRule.php | src/infrastructure/markup/markuprule/PhutilRemarkupAnchorRule.php | <?php
final class PhutilRemarkupAnchorRule extends PhutilRemarkupRule {
public function getPriority() {
return 200.0;
}
public function apply($text) {
return preg_replace_callback(
'/{anchor\s+#([^\s}]+)}/s',
array($this, 'markupAnchor'),
$text);
}
protected function markupAnchor... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/infrastructure/markup/markuprule/PhutilRemarkupDocumentLinkRule.php | src/infrastructure/markup/markuprule/PhutilRemarkupDocumentLinkRule.php | <?php
final class PhutilRemarkupDocumentLinkRule extends PhutilRemarkupRule {
public function getPriority() {
return 150.0;
}
public function apply($text) {
// Handle mediawiki-style links: [[ href | name ]]
$text = preg_replace_callback(
'@\B\\[\\[([^|\\]]+)(?:\\|([^\\]]+))?\\]\\]\B@U',
... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/infrastructure/markup/markuprule/PhutilRemarkupEscapeRemarkupRule.php | src/infrastructure/markup/markuprule/PhutilRemarkupEscapeRemarkupRule.php | <?php
final class PhutilRemarkupEscapeRemarkupRule extends PhutilRemarkupRule {
public function getPriority() {
return 0;
}
public function apply($text) {
if (strpos($text, "\1") === false) {
return $text;
}
$replace = $this->getEngine()->storeText("\1");
return str_replace("\1", $r... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/infrastructure/markup/markuprule/PhutilRemarkupHyperlinkEngineExtension.php | src/infrastructure/markup/markuprule/PhutilRemarkupHyperlinkEngineExtension.php | <?php
abstract class PhutilRemarkupHyperlinkEngineExtension
extends Phobject {
private $engine;
final public function getHyperlinkEngineKey() {
return $this->getPhobjectClassConstant('LINKENGINEKEY', 32);
}
final public static function getAllLinkEngines() {
return id(new PhutilClassMapQuery())
... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/infrastructure/markup/markuprule/PhutilRemarkupItalicRule.php | src/infrastructure/markup/markuprule/PhutilRemarkupItalicRule.php | <?php
final class PhutilRemarkupItalicRule extends PhutilRemarkupRule {
public function getPriority() {
return 1000.0;
}
public function apply($text) {
if ($this->getEngine()->isTextMode()) {
return $text;
}
return $this->replaceHTML(
'@(?<!:)//(.+?)//@s',
array($this, 'apply... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/infrastructure/markup/view/PHUIRemarkupView.php | src/infrastructure/markup/view/PHUIRemarkupView.php | <?php
/**
* Simple API for rendering blocks of Remarkup.
*
* Example usage:
*
* $fancy_text = new PHUIRemarkupView($viewer, $raw_remarkup);
* $view->appendChild($fancy_text);
*
*/
final class PHUIRemarkupView extends AphrontView {
private $corpus;
private $contextObject;
private $options;
private ... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/infrastructure/markup/view/PHUIRemarkupImageView.php | src/infrastructure/markup/view/PHUIRemarkupImageView.php | <?php
final class PHUIRemarkupImageView
extends AphrontView {
private $uri;
private $width;
private $height;
private $alt;
private $classes = array();
public function setURI($uri) {
$this->uri = $uri;
return $this;
}
public function getURI() {
return $this->uri;
}
public function ... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/infrastructure/markup/blockrule/PhutilRemarkupLiteralBlockRule.php | src/infrastructure/markup/blockrule/PhutilRemarkupLiteralBlockRule.php | <?php
final class PhutilRemarkupLiteralBlockRule extends PhutilRemarkupBlockRule {
public function getPriority() {
return 450;
}
public function getMatchingLineCount(array $lines, $cursor) {
// NOTE: We're consuming all continguous blocks of %%% literals, so this:
//
// %%%a%%%
// %%%... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/infrastructure/markup/blockrule/PhutilRemarkupBlockRule.php | src/infrastructure/markup/blockrule/PhutilRemarkupBlockRule.php | <?php
abstract class PhutilRemarkupBlockRule extends Phobject {
private $engine;
private $rules = array();
/**
* Determine the order in which blocks execute. Blocks with smaller priority
* numbers execute sooner than blocks with larger priority numbers. The
* default priority for blocks is `500`.
*... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/infrastructure/markup/blockrule/PhutilRemarkupHeaderBlockRule.php | src/infrastructure/markup/blockrule/PhutilRemarkupHeaderBlockRule.php | <?php
final class PhutilRemarkupHeaderBlockRule extends PhutilRemarkupBlockRule {
public function getMatchingLineCount(array $lines, $cursor) {
$num_lines = 0;
if (preg_match('/^(={1,5}|#{2,5}|# ).*+$/', $lines[$cursor])) {
$num_lines = 1;
} else {
if (isset($lines[$cursor + 1])) {
$... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/infrastructure/markup/blockrule/PhutilRemarkupSimpleTableBlockRule.php | src/infrastructure/markup/blockrule/PhutilRemarkupSimpleTableBlockRule.php | <?php
final class PhutilRemarkupSimpleTableBlockRule extends PhutilRemarkupBlockRule {
public function getMatchingLineCount(array $lines, $cursor) {
$num_lines = 0;
while (isset($lines[$cursor])) {
if (preg_match('/^(\s*\|.*+\n?)+$/', $lines[$cursor])) {
$num_lines++;
$cursor++;
... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/infrastructure/markup/blockrule/PhutilRemarkupInlineBlockRule.php | src/infrastructure/markup/blockrule/PhutilRemarkupInlineBlockRule.php | <?php
final class PhutilRemarkupInlineBlockRule extends PhutilRemarkupBlockRule {
public function getMatchingLineCount(array $lines, $cursor) {
return 1;
}
public function markupText($text, $children) {
return $this->applyRules($text);
}
}
| php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/infrastructure/markup/blockrule/PhutilRemarkupHorizontalRuleBlockRule.php | src/infrastructure/markup/blockrule/PhutilRemarkupHorizontalRuleBlockRule.php | <?php
final class PhutilRemarkupHorizontalRuleBlockRule
extends PhutilRemarkupBlockRule {
/**
* This rule executes at priority `300`, so it can preempt the list block
* rule and claim blocks which begin `---`.
*/
public function getPriority() {
return 300;
}
public function getMatchingLineCoun... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/infrastructure/markup/blockrule/PhutilRemarkupDefaultBlockRule.php | src/infrastructure/markup/blockrule/PhutilRemarkupDefaultBlockRule.php | <?php
final class PhutilRemarkupDefaultBlockRule extends PhutilRemarkupBlockRule {
public function getPriority() {
return 750;
}
public function getMatchingLineCount(array $lines, $cursor) {
return 1;
}
public function markupText($text, $children) {
$engine = $this->getEngine();
$text = t... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/infrastructure/markup/blockrule/PhutilRemarkupNoteBlockRule.php | src/infrastructure/markup/blockrule/PhutilRemarkupNoteBlockRule.php | <?php
final class PhutilRemarkupNoteBlockRule extends PhutilRemarkupBlockRule {
public function getMatchingLineCount(array $lines, $cursor) {
$num_lines = 0;
if (preg_match($this->getRegEx(), $lines[$cursor])) {
$num_lines++;
$cursor++;
while (isset($lines[$cursor])) {
if (trim($... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/infrastructure/markup/blockrule/PhutilRemarkupTableBlockRule.php | src/infrastructure/markup/blockrule/PhutilRemarkupTableBlockRule.php | <?php
final class PhutilRemarkupTableBlockRule extends PhutilRemarkupBlockRule {
public function getMatchingLineCount(array $lines, $cursor) {
$num_lines = 0;
if (preg_match('/^\s*<table>/i', $lines[$cursor])) {
$num_lines++;
$cursor++;
while (isset($lines[$cursor])) {
$num_lines... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/infrastructure/markup/blockrule/PhutilRemarkupQuotesBlockRule.php | src/infrastructure/markup/blockrule/PhutilRemarkupQuotesBlockRule.php | <?php
final class PhutilRemarkupQuotesBlockRule
extends PhutilRemarkupQuotedBlockRule {
public function getMatchingLineCount(array $lines, $cursor) {
$pos = $cursor;
if (preg_match('/^>/', $lines[$pos])) {
do {
++$pos;
} while (isset($lines[$pos]) && preg_match('/^>/', $lines[$pos]));... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/infrastructure/markup/blockrule/PhutilRemarkupTestInterpreterRule.php | src/infrastructure/markup/blockrule/PhutilRemarkupTestInterpreterRule.php | <?php
final class PhutilRemarkupTestInterpreterRule
extends PhutilRemarkupBlockInterpreter {
public function getInterpreterName() {
return 'phutil_test_block_interpreter';
}
public function markupContent($content, array $argv) {
return sprintf(
"Content: (%s)\nArgv: (%s)",
$content,
... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/infrastructure/markup/blockrule/PhutilRemarkupQuotedBlockRule.php | src/infrastructure/markup/blockrule/PhutilRemarkupQuotedBlockRule.php | <?php
abstract class PhutilRemarkupQuotedBlockRule
extends PhutilRemarkupBlockRule {
final public function supportsChildBlocks() {
return true;
}
public function willMarkupChildBlocks() {
$engine = $this->getEngine();
$depth = $engine->getQuoteDepth();
$depth = $depth + 1;
$engine->setQu... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/infrastructure/markup/blockrule/PhutilRemarkupBlockInterpreter.php | src/infrastructure/markup/blockrule/PhutilRemarkupBlockInterpreter.php | <?php
abstract class PhutilRemarkupBlockInterpreter extends Phobject {
private $engine;
final public function setEngine($engine) {
$this->engine = $engine;
return $this;
}
final public function getEngine() {
return $this->engine;
}
/**
* @return string
*/
abstract public function ge... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/infrastructure/markup/blockrule/PhutilRemarkupInterpreterBlockRule.php | src/infrastructure/markup/blockrule/PhutilRemarkupInterpreterBlockRule.php | <?php
final class PhutilRemarkupInterpreterBlockRule extends PhutilRemarkupBlockRule {
const START_BLOCK_PATTERN = '/^([\w]+)\s*(?:\(([^)]+)\)\s*)?{{{/';
const END_BLOCK_PATTERN = '/}}}\s*$/';
public function getMatchingLineCount(array $lines, $cursor) {
$num_lines = 0;
if (preg_match(self::START_BL... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/infrastructure/markup/blockrule/PhutilRemarkupReplyBlockRule.php | src/infrastructure/markup/blockrule/PhutilRemarkupReplyBlockRule.php | <?php
final class PhutilRemarkupReplyBlockRule
extends PhutilRemarkupQuotedBlockRule {
public function getPriority() {
return 400;
}
public function getMatchingLineCount(array $lines, $cursor) {
$pos = $cursor;
if (preg_match('/^>>!/', $lines[$pos])) {
do {
++$pos;
} while (i... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/infrastructure/markup/blockrule/PhutilRemarkupListBlockRule.php | src/infrastructure/markup/blockrule/PhutilRemarkupListBlockRule.php | <?php
final class PhutilRemarkupListBlockRule extends PhutilRemarkupBlockRule {
/**
* This rule must apply before the Code block rule because it needs to
* win blocks which begin ` - Lorem ipsum`.
*/
public function getPriority() {
return 400;
}
public function getMatchingLineCount(array $lines... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/infrastructure/markup/blockrule/PhutilRemarkupCodeBlockRule.php | src/infrastructure/markup/blockrule/PhutilRemarkupCodeBlockRule.php | <?php
final class PhutilRemarkupCodeBlockRule extends PhutilRemarkupBlockRule {
public function getMatchingLineCount(array $lines, $cursor) {
$num_lines = 0;
$match_ticks = null;
if (preg_match('/^(\s{2,}).+/', $lines[$cursor])) {
$match_ticks = false;
} else if (preg_match('/^\s*(```)/', $lin... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/infrastructure/markup/syntax/engine/PhutilSyntaxHighlighterEngine.php | src/infrastructure/markup/syntax/engine/PhutilSyntaxHighlighterEngine.php | <?php
abstract class PhutilSyntaxHighlighterEngine extends Phobject {
abstract public function setConfig($key, $value);
abstract public function getHighlightFuture($language, $source);
abstract public function getLanguageFromFilename($filename);
final public function highlightSource($language, $source) {
... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/infrastructure/markup/syntax/engine/PhutilDefaultSyntaxHighlighterEngine.php | src/infrastructure/markup/syntax/engine/PhutilDefaultSyntaxHighlighterEngine.php | <?php
final class PhutilDefaultSyntaxHighlighterEngine
extends PhutilSyntaxHighlighterEngine {
private $config = array();
public function setConfig($key, $value) {
$this->config[$key] = $value;
return $this;
}
public function getLanguageFromFilename($filename) {
static $default_map = array(
... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/infrastructure/markup/syntax/engine/__tests__/PhutilDefaultSyntaxHighlighterEngineTestCase.php | src/infrastructure/markup/syntax/engine/__tests__/PhutilDefaultSyntaxHighlighterEngineTestCase.php | <?php
/**
* Test cases for @{class:PhutilDefaultSyntaxHighlighterEngine}.
*/
final class PhutilDefaultSyntaxHighlighterEngineTestCase
extends PhutilTestCase {
public function testFilenameGreediness() {
$names = array(
'x.php' => 'php',
'/x.php' => 'php',
'x.y.php' => 'php',
... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/infrastructure/markup/syntax/highlighter/PhutilDivinerSyntaxHighlighter.php | src/infrastructure/markup/syntax/highlighter/PhutilDivinerSyntaxHighlighter.php | <?php
/**
* Simple syntax highlighter for the ".diviner" format, which is just Remarkup
* with a specific ruleset. This should also work alright for Remarkup.
*/
final class PhutilDivinerSyntaxHighlighter extends Phobject {
private $config = array();
private $replaceClass;
public function setConfig($key, $v... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/infrastructure/markup/syntax/highlighter/PhutilLexerSyntaxHighlighter.php | src/infrastructure/markup/syntax/highlighter/PhutilLexerSyntaxHighlighter.php | <?php
final class PhutilLexerSyntaxHighlighter extends PhutilSyntaxHighlighter {
private $config = array();
public function setConfig($key, $value) {
$this->config[$key] = $value;
return $this;
}
public function getHighlightFuture($source) {
$strip = false;
$state = 'start';
$lang = idx(... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/infrastructure/markup/syntax/highlighter/PhutilDefaultSyntaxHighlighter.php | src/infrastructure/markup/syntax/highlighter/PhutilDefaultSyntaxHighlighter.php | <?php
final class PhutilDefaultSyntaxHighlighter extends Phobject {
public function setConfig($key, $value) {
return $this;
}
public function getHighlightFuture($source) {
$result = hsprintf('%s', $source);
return new ImmediateFuture($result);
}
}
| php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/infrastructure/markup/syntax/highlighter/PhutilConsoleSyntaxHighlighter.php | src/infrastructure/markup/syntax/highlighter/PhutilConsoleSyntaxHighlighter.php | <?php
/**
* Simple syntax highlighter for console output. We just try to highlight the
* commands so it's easier to follow transcripts.
*/
final class PhutilConsoleSyntaxHighlighter extends Phobject {
private $config = array();
public function setConfig($key, $value) {
$this->config[$key] = $value;
re... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/infrastructure/markup/syntax/highlighter/PhutilSyntaxHighlighterException.php | src/infrastructure/markup/syntax/highlighter/PhutilSyntaxHighlighterException.php | <?php
final class PhutilSyntaxHighlighterException extends Exception {}
| php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/infrastructure/markup/syntax/highlighter/PhutilXHPASTSyntaxHighlighter.php | src/infrastructure/markup/syntax/highlighter/PhutilXHPASTSyntaxHighlighter.php | <?php
final class PhutilXHPASTSyntaxHighlighter extends Phobject {
public function getHighlightFuture($source) {
$scrub = false;
if (strpos($source, '<?') === false) {
$source = "<?php\n".$source;
$scrub = true;
}
return new PhutilXHPASTSyntaxHighlighterFuture(
PhutilXHPASTBinary:... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/infrastructure/markup/syntax/highlighter/PhutilSyntaxHighlighter.php | src/infrastructure/markup/syntax/highlighter/PhutilSyntaxHighlighter.php | <?php
abstract class PhutilSyntaxHighlighter extends Phobject {
abstract public function setConfig($key, $value);
abstract public function getHighlightFuture($source);
}
| php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/infrastructure/markup/syntax/highlighter/PhutilRainbowSyntaxHighlighter.php | src/infrastructure/markup/syntax/highlighter/PhutilRainbowSyntaxHighlighter.php | <?php
/**
* Highlights source code with a rainbow of colors, regardless of the language.
* This highlighter is useless, absurd, and extremely slow.
*/
final class PhutilRainbowSyntaxHighlighter extends Phobject {
private $config = array();
public function setConfig($key, $value) {
$this->config[$key] = $v... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/infrastructure/markup/syntax/highlighter/PhutilPygmentsSyntaxHighlighter.php | src/infrastructure/markup/syntax/highlighter/PhutilPygmentsSyntaxHighlighter.php | <?php
final class PhutilPygmentsSyntaxHighlighter extends Phobject {
private $config = array();
public function setConfig($key, $value) {
$this->config[$key] = $value;
return $this;
}
public function getHighlightFuture($source) {
$language = idx($this->config, 'language');
if (preg_match('/... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/infrastructure/markup/syntax/highlighter/PhutilInvisibleSyntaxHighlighter.php | src/infrastructure/markup/syntax/highlighter/PhutilInvisibleSyntaxHighlighter.php | <?php
final class PhutilInvisibleSyntaxHighlighter extends Phobject {
private $config = array();
public function setConfig($key, $value) {
$this->config[$key] = $value;
return $this;
}
public function getHighlightFuture($source) {
$keys = array_map('chr', range(0x0, 0x1F));
$vals =... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/infrastructure/markup/syntax/highlighter/xhpast/PhutilXHPASTSyntaxHighlighterFuture.php | src/infrastructure/markup/syntax/highlighter/xhpast/PhutilXHPASTSyntaxHighlighterFuture.php | <?php
final class PhutilXHPASTSyntaxHighlighterFuture extends FutureProxy {
private $source;
private $scrub;
public function __construct(Future $proxied, $source, $scrub = false) {
parent::__construct($proxied);
$this->source = $source;
$this->scrub = $scrub;
}
protected function didReceiveRes... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/infrastructure/markup/syntax/highlighter/__tests__/PhutilJSONFragmentLexerHighlighterTestCase.php | src/infrastructure/markup/syntax/highlighter/__tests__/PhutilJSONFragmentLexerHighlighterTestCase.php | <?php
final class PhutilJSONFragmentLexerHighlighterTestCase extends PhutilTestCase {
public function testLexer() {
$highlighter = id(new PhutilLexerSyntaxHighlighter())
->setConfig('language', 'json')
->setConfig('lexer', new PhutilJSONFragmentLexer());
$path = dirname(__FILE__).'/data/jsonfra... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/infrastructure/markup/syntax/highlighter/__tests__/PhutilXHPASTSyntaxHighlighterTestCase.php | src/infrastructure/markup/syntax/highlighter/__tests__/PhutilXHPASTSyntaxHighlighterTestCase.php | <?php
final class PhutilXHPASTSyntaxHighlighterTestCase extends PhutilTestCase {
private function highlight($source) {
$highlighter = new PhutilXHPASTSyntaxHighlighter();
$future = $highlighter->getHighlightFuture($source);
return $future->resolve();
}
private function read($file) {
$path = dir... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/infrastructure/markup/syntax/highlighter/__tests__/PhutilPHPFragmentLexerHighlighterTestCase.php | src/infrastructure/markup/syntax/highlighter/__tests__/PhutilPHPFragmentLexerHighlighterTestCase.php | <?php
final class PhutilPHPFragmentLexerHighlighterTestCase extends PhutilTestCase {
public function testLexer() {
$highlighter = new PhutilLexerSyntaxHighlighter();
$highlighter->setConfig('language', 'php');
$highlighter->setConfig('lexer', new PhutilPHPFragmentLexer());
$path = dirname(__FILE__... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.