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
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/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
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/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
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/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
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/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
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/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
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/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
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/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
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/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
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/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
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/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
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/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
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/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
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/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
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/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
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/src/infrastructure/markup/interface/RemarkupSyntaxDocumentationProvider.php
src/infrastructure/markup/interface/RemarkupSyntaxDocumentationProvider.php
<?php interface RemarkupSyntaxDocumentationProvider { public function getDocumentation(); }
php
Apache-2.0
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/src/infrastructure/markup/__tests__/PhutilRemarkupEngineTestCase.php
src/infrastructure/markup/__tests__/PhutilRemarkupEngineTestCase.php
<?php /** * Test cases for @{class:PhutilRemarkupEngine}. */ final class PhutilRemarkupEngineTestCase extends PhutilTestCase { public function testEngine() { $root = dirname(__FILE__).'/remarkup/'; foreach (Filesystem::listDirectory($root, $hidden = false) as $file) { $this->markupText($root.$file);...
php
Apache-2.0
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/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
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/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
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/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
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/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
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/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
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/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
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/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
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/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
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/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
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/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
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/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
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/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
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/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
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/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
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/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
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/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
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/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
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/src/infrastructure/markup/markuprule/PhutilRemarkupHexColorCodeRule.php
src/infrastructure/markup/markuprule/PhutilRemarkupHexColorCodeRule.php
<?php final class PhutilRemarkupHexColorCodeRule extends PhabricatorRemarkupCustomInlineRule { public function getPriority() { return 1000.0; } public function apply($text) { // Match {#FFFFFF} if (is_string($text)) { return preg_replace_callback( '@\B\{(#([0-9a-fA-F]{3}){1,2})\}@', ...
php
Apache-2.0
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/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
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/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
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/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
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/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
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/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
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/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 contiguous blocks of %%% literals, so this: // // %%%a%%% // %%%b...
php
Apache-2.0
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/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
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/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
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/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
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/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
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/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
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/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
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/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
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/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
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/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
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/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
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/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
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/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
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/src/infrastructure/markup/blockrule/PhutilRemarkupInterpreterBlockRule.php
src/infrastructure/markup/blockrule/PhutilRemarkupInterpreterBlockRule.php
<?php final class PhutilRemarkupInterpreterBlockRule extends PhutilRemarkupBlockRule { /** * Second part of the regex to find stuff like: * interpreterName {{{ stuff }}} * interpreterName (options) {{{ stuff }}} * You have found the kernel of cowsay and figlet. */ const END_BLOCK_PATTERN ...
php
Apache-2.0
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/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
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/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
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/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
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/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
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/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
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/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
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/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
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/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
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/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
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/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
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/src/infrastructure/markup/syntax/highlighter/PhutilSyntaxHighlighterException.php
src/infrastructure/markup/syntax/highlighter/PhutilSyntaxHighlighterException.php
<?php final class PhutilSyntaxHighlighterException extends Exception {}
php
Apache-2.0
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/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
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/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
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/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
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/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
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/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
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/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
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/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
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/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
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/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
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/src/infrastructure/markup/syntax/highlighter/pygments/PhutilDefaultSyntaxHighlighterEnginePygmentsFuture.php
src/infrastructure/markup/syntax/highlighter/pygments/PhutilDefaultSyntaxHighlighterEnginePygmentsFuture.php
<?php final class PhutilDefaultSyntaxHighlighterEnginePygmentsFuture extends FutureProxy { private $source; private $scrub; public function __construct(Future $proxied, $source, $scrub = false) { parent::__construct($proxied); $this->source = $source; $this->scrub = $scrub; } protected funct...
php
Apache-2.0
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/src/infrastructure/markup/remarkup/PhutilRemarkupEngine.php
src/infrastructure/markup/remarkup/PhutilRemarkupEngine.php
<?php final class PhutilRemarkupEngine extends PhutilMarkupEngine { const MODE_DEFAULT = 0; const MODE_TEXT = 1; const MODE_HTML_MAIL = 2; const MAX_CHILD_DEPTH = 32; private $blockRules = array(); private $config = array(); private $mode; private $metadata = array(); private $states = array(); ...
php
Apache-2.0
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/src/infrastructure/markup/interpreter/PhabricatorRemarkupCowsayBlockInterpreter.php
src/infrastructure/markup/interpreter/PhabricatorRemarkupCowsayBlockInterpreter.php
<?php final class PhabricatorRemarkupCowsayBlockInterpreter extends PhutilRemarkupBlockInterpreter implements RemarkupSyntaxDocumentationProvider { public function getInterpreterName() { return 'cowsay'; } public function markupContent($content, array $argv) { $action = idx($argv, 'think') ? 'think...
php
Apache-2.0
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/src/infrastructure/markup/interpreter/PhabricatorRemarkupFigletBlockInterpreter.php
src/infrastructure/markup/interpreter/PhabricatorRemarkupFigletBlockInterpreter.php
<?php final class PhabricatorRemarkupFigletBlockInterpreter extends PhutilRemarkupBlockInterpreter implements RemarkupSyntaxDocumentationProvider { public function getInterpreterName() { return 'figlet'; } /** * @phutil-external-symbol class Text_Figlet */ public function markupContent($content...
php
Apache-2.0
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/src/applications/phriction/controller/PhrictionDeleteController.php
src/applications/phriction/controller/PhrictionDeleteController.php
<?php final class PhrictionDeleteController extends PhrictionController { public function handleRequest(AphrontRequest $request) { $viewer = $request->getViewer(); $id = $request->getURIData('id'); $document = id(new PhrictionDocumentQuery()) ->setViewer($viewer) ->withIDs(array($id)) ...
php
Apache-2.0
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/src/applications/phriction/controller/PhrictionDiffController.php
src/applications/phriction/controller/PhrictionDiffController.php
<?php final class PhrictionDiffController extends PhrictionController { public function shouldAllowPublic() { return true; } public function handleRequest(AphrontRequest $request) { $viewer = $request->getViewer(); $id = $request->getURIData('id'); $document = id(new PhrictionDocumentQuery()) ...
php
Apache-2.0
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/src/applications/phriction/controller/PhrictionEditEngineController.php
src/applications/phriction/controller/PhrictionEditEngineController.php
<?php final class PhrictionEditEngineController extends PhrictionController { public function handleRequest(AphrontRequest $request) { // NOTE: For now, this controller is only used to handle comments. return id(new PhrictionDocumentEditEngine()) ->setController($this) ->buildResponse(); } ...
php
Apache-2.0
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/src/applications/phriction/controller/PhrictionEditController.php
src/applications/phriction/controller/PhrictionEditController.php
<?php final class PhrictionEditController extends PhrictionController { public function handleRequest(AphrontRequest $request) { $viewer = $request->getViewer(); $id = $request->getURIData('id'); $max_version = null; if ($id) { $is_new = false; $document = id(new PhrictionDocumentQuer...
php
Apache-2.0
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/src/applications/phriction/controller/PhrictionMarkupPreviewController.php
src/applications/phriction/controller/PhrictionMarkupPreviewController.php
<?php final class PhrictionMarkupPreviewController extends PhabricatorController { public function handleRequest(AphrontRequest $request) { $viewer = $request->getViewer(); $text = $request->getStr('text'); $slug = $request->getStr('slug'); $document = id(new PhrictionDocumentQuery()) ->se...
php
Apache-2.0
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/src/applications/phriction/controller/PhrictionDocumentController.php
src/applications/phriction/controller/PhrictionDocumentController.php
<?php final class PhrictionDocumentController extends PhrictionController { private $slug; public function shouldAllowPublic() { return true; } public function handleRequest(AphrontRequest $request) { $viewer = $request->getViewer(); $this->slug = $request->getURIData('slug'); $slug = Ph...
php
Apache-2.0
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/src/applications/phriction/controller/PhrictionListController.php
src/applications/phriction/controller/PhrictionListController.php
<?php final class PhrictionListController extends PhrictionController { public function shouldAllowPublic() { return true; } public function handleRequest(AphrontRequest $request) { $querykey = $request->getURIData('queryKey'); $controller = id(new PhabricatorApplicationSearchController()) ...
php
Apache-2.0
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/src/applications/phriction/controller/PhrictionPublishController.php
src/applications/phriction/controller/PhrictionPublishController.php
<?php final class PhrictionPublishController extends PhrictionController { public function handleRequest(AphrontRequest $request) { $viewer = $request->getViewer(); $id = $request->getURIData('documentID'); $content_id = $request->getURIData('contentID'); $document = id(new PhrictionDocumentQuery...
php
Apache-2.0
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/src/applications/phriction/controller/PhrictionController.php
src/applications/phriction/controller/PhrictionController.php
<?php abstract class PhrictionController extends PhabricatorController { private $showingWelcomeDocument = false; public function setShowingWelcomeDocument($show_welcome) { $this->showingWelcomeDocument = $show_welcome; return $this; } public function buildSideNavView($for_app = false) { $user ...
php
Apache-2.0
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/src/applications/phriction/controller/PhrictionHistoryController.php
src/applications/phriction/controller/PhrictionHistoryController.php
<?php final class PhrictionHistoryController extends PhrictionController { public function shouldAllowPublic() { return true; } public function handleRequest(AphrontRequest $request) { $viewer = $request->getViewer(); $slug = $request->getURIData('slug'); $document = id(new PhrictionDocument...
php
Apache-2.0
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/src/applications/phriction/controller/PhrictionMoveController.php
src/applications/phriction/controller/PhrictionMoveController.php
<?php final class PhrictionMoveController extends PhrictionController { public function handleRequest(AphrontRequest $request) { $viewer = $this->getViewer(); $document = id(new PhrictionDocumentQuery()) ->setViewer($viewer) ->withIDs(array($request->getURIData('id'))) ->needContent(true)...
php
Apache-2.0
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/src/applications/phriction/controller/PhrictionNewController.php
src/applications/phriction/controller/PhrictionNewController.php
<?php final class PhrictionNewController extends PhrictionController { public function handleRequest(AphrontRequest $request) { $viewer = $request->getViewer(); $slug = PhabricatorSlug::normalize($request->getStr('slug')); if ($request->isFormPost()) { $document = id(new PhrictionDocumentQuery())...
php
Apache-2.0
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/src/applications/phriction/engineextension/PhrictionHovercardEngineExtension.php
src/applications/phriction/engineextension/PhrictionHovercardEngineExtension.php
<?php final class PhrictionHovercardEngineExtension extends PhabricatorHovercardEngineExtension { const EXTENSIONKEY = 'phriction'; public function isExtensionEnabled() { return PhabricatorApplication::isClassInstalled( PhabricatorPhrictionApplication::class); } public function getExtensionName(...
php
Apache-2.0
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/src/applications/phriction/engineextension/PhrictionDatasourceEngineExtension.php
src/applications/phriction/engineextension/PhrictionDatasourceEngineExtension.php
<?php final class PhrictionDatasourceEngineExtension extends PhabricatorDatasourceEngineExtension { public function newQuickSearchDatasources() { return array( new PhrictionDocumentDatasource(), ); } public function newJumpURI($query) { $viewer = $this->getViewer(); // Send "w" to Phri...
php
Apache-2.0
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/src/applications/phriction/engineextension/PhrictionContentSearchEngineAttachment.php
src/applications/phriction/engineextension/PhrictionContentSearchEngineAttachment.php
<?php final class PhrictionContentSearchEngineAttachment extends PhabricatorSearchEngineAttachment { public function getAttachmentName() { return pht('Document Content'); } public function getAttachmentDescription() { return pht('Get the content of documents or document histories.'); } public fu...
php
Apache-2.0
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/src/applications/phriction/storage/PhrictionTransaction.php
src/applications/phriction/storage/PhrictionTransaction.php
<?php final class PhrictionTransaction extends PhabricatorModularTransaction { const MAILTAG_TITLE = 'phriction-title'; const MAILTAG_CONTENT = 'phriction-content'; const MAILTAG_DELETE = 'phriction-delete'; const MAILTAG_SUBSCRIBERS = 'phriction-subscribers'; const MAILTAG_OTHER = 'p...
php
Apache-2.0
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/src/applications/phriction/storage/PhrictionDocument.php
src/applications/phriction/storage/PhrictionDocument.php
<?php final class PhrictionDocument extends PhrictionDAO implements PhabricatorPolicyInterface, PhabricatorSubscribableInterface, PhabricatorFlaggableInterface, PhabricatorTokenReceiverInterface, PhabricatorDestructibleInterface, PhabricatorFulltextInterface, PhabricatorFerretInterface, ...
php
Apache-2.0
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/src/applications/phriction/storage/PhrictionSchemaSpec.php
src/applications/phriction/storage/PhrictionSchemaSpec.php
<?php final class PhrictionSchemaSpec extends PhabricatorConfigSchemaSpec { public function buildSchemata() { $this->buildEdgeSchemata(new PhrictionDocument()); } }
php
Apache-2.0
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/src/applications/phriction/storage/PhrictionContent.php
src/applications/phriction/storage/PhrictionContent.php
<?php final class PhrictionContent extends PhrictionDAO implements PhabricatorPolicyInterface, PhabricatorDestructibleInterface, PhabricatorConduitResultInterface { protected $documentPHID; protected $version; protected $authorPHID; protected $title; protected $slug; protected $content; ...
php
Apache-2.0
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/src/applications/phriction/storage/PhrictionTransactionComment.php
src/applications/phriction/storage/PhrictionTransactionComment.php
<?php final class PhrictionTransactionComment extends PhabricatorApplicationTransactionComment { public function getApplicationTransactionObject() { return new PhrictionTransaction(); } }
php
Apache-2.0
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/src/applications/phriction/storage/PhrictionDAO.php
src/applications/phriction/storage/PhrictionDAO.php
<?php abstract class PhrictionDAO extends PhabricatorLiskDAO { public function getApplicationName() { return 'phriction'; } }
php
Apache-2.0
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/src/applications/phriction/query/PhrictionContentSearchEngine.php
src/applications/phriction/query/PhrictionContentSearchEngine.php
<?php final class PhrictionContentSearchEngine extends PhabricatorApplicationSearchEngine { public function getResultTypeDescription() { return pht('Phriction Document Content'); } public function getApplicationClassName() { return PhabricatorPhrictionApplication::class; } public function newQue...
php
Apache-2.0
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/src/applications/phriction/query/PhrictionDocumentSearchEngine.php
src/applications/phriction/query/PhrictionDocumentSearchEngine.php
<?php final class PhrictionDocumentSearchEngine extends PhabricatorApplicationSearchEngine { public function getResultTypeDescription() { return pht('Wiki Documents'); } public function getApplicationClassName() { return PhabricatorPhrictionApplication::class; } public function newQuery() { ...
php
Apache-2.0
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false