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/scripts/celerity/generate_sprites.php
scripts/celerity/generate_sprites.php
#!/usr/bin/env php <?php require_once dirname(dirname(__FILE__)).'/__init_script__.php'; echo pht('This script was replaced with `%s`!.', './bin/celerity sprites'); echo "\n"; exit(13);
php
Apache-2.0
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/scripts/sql/manage_storage.php
scripts/sql/manage_storage.php
#!/usr/bin/env php <?php $root = dirname(dirname(dirname(__FILE__))); require_once $root.'/scripts/init/init-setup.php'; $args = new PhutilArgumentParser($argv); $args->setTagline(pht('manage storage and schemata')); $args->setSynopsis(pht(<<<EOHELP **storage** __workflow__ [__options__] Manage database storage and s...
php
Apache-2.0
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/support/aphlict/server/aphlict_launcher.php
support/aphlict/server/aphlict_launcher.php
#!/usr/bin/env php <?php $root = dirname(dirname(dirname(dirname(__FILE__)))); require_once $root.'/scripts/init/init-aphlict.php'; PhabricatorAphlictManagementWorkflow::requireExtensions(); $args = new PhutilArgumentParser($argv); $args->setTagline(pht('manage Aphlict notification server')); $args->setSynopsis(pht(...
php
Apache-2.0
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/support/phame/libskin.php
support/phame/libskin.php
<?php function _e($text) { return phutil_escape_html($text); }
php
Apache-2.0
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/support/php-parser/PhorgePHPParserExtractor.php
support/php-parser/PhorgePHPParserExtractor.php
<?php final class PhorgePHPParserExtractor extends PhpParser\NodeVisitorAbstract { private static $knownTypes = array( 'PhabricatorEdgeType' => array( 'getTransactionAddString' => array(null, 'number', null), 'getTransactionRemoveString' => array(null, 'number', null), 'getTransactionEditString...
php
Apache-2.0
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/support/startup/PhabricatorClientConnectionLimit.php
support/startup/PhabricatorClientConnectionLimit.php
<?php final class PhabricatorClientConnectionLimit extends PhabricatorClientLimit { protected function getBucketDuration() { return 60; } protected function getBucketCount() { return 15; } protected function shouldRejectConnection($score) { // Reject connections if the cumulative score acros...
php
Apache-2.0
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/support/startup/PhabricatorClientLimit.php
support/startup/PhabricatorClientLimit.php
<?php abstract class PhabricatorClientLimit { private $limitKey; private $clientKey; private $limit; final public function setLimitKey($limit_key) { $this->limitKey = $limit_key; return $this; } final public function getLimitKey() { return $this->limitKey; } final public function setCli...
php
Apache-2.0
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/support/startup/PhabricatorStartup.php
support/startup/PhabricatorStartup.php
<?php /** * Handle request startup, before loading the environment or libraries. This * class bootstraps the request state up to the point where we can enter * Phorge code. * * NOTE: This class MUST NOT have any dependencies. It runs before libraries * load. * * Rate Limiting * ============= * * Phorge limi...
php
Apache-2.0
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/support/startup/PhabricatorClientRateLimit.php
support/startup/PhabricatorClientRateLimit.php
<?php final class PhabricatorClientRateLimit extends PhabricatorClientLimit { protected function getBucketDuration() { return 60; } protected function getBucketCount() { return 5; } protected function shouldRejectConnection($score) { $limit = $this->getLimit(); // Reject connections if ...
php
Apache-2.0
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/support/startup/preamble-utils.php
support/startup/preamble-utils.php
<?php /** * Parse the "X_FORWARDED_FOR" HTTP header to determine the original client * address. * * @param int $layers (optional) Number of devices to trust. * @return void */ function preamble_trust_x_forwarded_for_header($layers = 1) { if (!is_int($layers) || ($layers < 1)) { echo 'preamble_trust_...
php
Apache-2.0
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/support/startup/__tests__/PreambleUtilsTestCase.php
support/startup/__tests__/PreambleUtilsTestCase.php
#!/usr/bin/env php <?php /** * /startup/ is not a Phutil library, so it can't use the phutil test fixture. * This script will just run the tests directly. * * NOTE: This test file will not run as part of `arc unit` run! */ final class PreambleUtilsTestCase { public function testTrustXForwardValues() { /...
php
Apache-2.0
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/webroot/index.php
webroot/index.php
<?php phabricator_startup(); $fatal_exception = null; try { PhabricatorStartup::beginStartupPhase('libraries'); PhabricatorStartup::loadCoreLibraries(); PhabricatorStartup::beginStartupPhase('purge'); PhabricatorCaches::destroyRequestCache(); PhabricatorStartup::beginStartupPhase('sink'); $sink = new Ap...
php
Apache-2.0
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/src/__phutil_library_map__.php
src/__phutil_library_map__.php
<?php /** * This file is automatically generated. Use 'arc liberate' to rebuild it. * * @generated * @phutil-library-version 2 */ phutil_register_library_map(array( '__library_version__' => 2, 'class' => array( 'AlmanacAddress' => 'applications/almanac/util/AlmanacAddress.php', 'AlmanacBinding' => 'ap...
php
Apache-2.0
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
true
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/src/__phutil_library_init__.php
src/__phutil_library_init__.php
<?php phutil_register_library('phorge', __FILE__);
php
Apache-2.0
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/src/infrastructure/PhabricatorEditor.php
src/infrastructure/PhabricatorEditor.php
<?php abstract class PhabricatorEditor extends Phobject { private $actor; private $excludeMailRecipientPHIDs = array(); final public function setActor(PhabricatorUser $actor) { $this->actor = $actor; return $this; } final public function getActor() { return $this->actor; } final public fu...
php
Apache-2.0
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/src/infrastructure/storage/management/PhabricatorStorageManagementAPI.php
src/infrastructure/storage/management/PhabricatorStorageManagementAPI.php
<?php final class PhabricatorStorageManagementAPI extends Phobject { private $ref; private $host; private $user; private $port; private $password; private $namespace; private $conns = array(); private $disableUTF8MB4; const CHARSET_DEFAULT = 'CHARSET'; const CHARSET_SORT = 'CHARSET_SORT'; const...
php
Apache-2.0
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/src/infrastructure/storage/management/PhabricatorStoragePatch.php
src/infrastructure/storage/management/PhabricatorStoragePatch.php
<?php final class PhabricatorStoragePatch extends Phobject { private $key; private $fullKey; private $name; private $type; private $after; private $legacy; private $dead; private $phase; const PHASE_DEFAULT = 'default'; const PHASE_WORKER = 'worker'; public function __construct(array $dict) { ...
php
Apache-2.0
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/src/infrastructure/storage/management/workflow/PhabricatorStorageManagementQuickstartWorkflow.php
src/infrastructure/storage/management/workflow/PhabricatorStorageManagementQuickstartWorkflow.php
<?php final class PhabricatorStorageManagementQuickstartWorkflow extends PhabricatorStorageManagementWorkflow { protected function didConstruct() { $this ->setName('quickstart') ->setExamples('**quickstart** [__options__]') ->setSynopsis( pht( 'Generate a new quickstart dat...
php
Apache-2.0
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/src/infrastructure/storage/management/workflow/PhabricatorStorageManagementWorkflow.php
src/infrastructure/storage/management/workflow/PhabricatorStorageManagementWorkflow.php
<?php abstract class PhabricatorStorageManagementWorkflow extends PhabricatorManagementWorkflow { private $apis = array(); private $dryRun; private $force; private $patches; private $didInitialize; final public function setAPIs(array $apis) { $this->apis = $apis; return $this; } final pub...
php
Apache-2.0
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
true
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/src/infrastructure/storage/management/workflow/PhabricatorStorageManagementStatusWorkflow.php
src/infrastructure/storage/management/workflow/PhabricatorStorageManagementStatusWorkflow.php
<?php final class PhabricatorStorageManagementStatusWorkflow extends PhabricatorStorageManagementWorkflow { protected function didConstruct() { $this ->setName('status') ->setExamples('**status** [__options__]') ->setSynopsis(pht('Show patch application status.')); } protected function ...
php
Apache-2.0
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/src/infrastructure/storage/management/workflow/PhabricatorStorageManagementAdjustWorkflow.php
src/infrastructure/storage/management/workflow/PhabricatorStorageManagementAdjustWorkflow.php
<?php final class PhabricatorStorageManagementAdjustWorkflow extends PhabricatorStorageManagementWorkflow { protected function didConstruct() { $this ->setName('adjust') ->setExamples('**adjust** [__options__]') ->setSynopsis( pht( 'Make schemata adjustments to correct issu...
php
Apache-2.0
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/src/infrastructure/storage/management/workflow/PhabricatorStorageManagementOptimizeWorkflow.php
src/infrastructure/storage/management/workflow/PhabricatorStorageManagementOptimizeWorkflow.php
<?php final class PhabricatorStorageManagementOptimizeWorkflow extends PhabricatorStorageManagementWorkflow { protected function didConstruct() { $this ->setName('optimize') ->setExamples('**optimize**') ->setSynopsis(pht('Run "OPTIMIZE TABLE" on tables to reclaim space.')); } public fu...
php
Apache-2.0
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/src/infrastructure/storage/management/workflow/PhabricatorStorageManagementAnalyzeWorkflow.php
src/infrastructure/storage/management/workflow/PhabricatorStorageManagementAnalyzeWorkflow.php
<?php final class PhabricatorStorageManagementAnalyzeWorkflow extends PhabricatorStorageManagementWorkflow { protected function didConstruct() { $this ->setName('analyze') ->setExamples('**analyze**') ->setSynopsis( pht('Run "ANALYZE TABLE" on tables to improve performance.')); } ...
php
Apache-2.0
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/src/infrastructure/storage/management/workflow/PhabricatorStorageManagementShellWorkflow.php
src/infrastructure/storage/management/workflow/PhabricatorStorageManagementShellWorkflow.php
<?php final class PhabricatorStorageManagementShellWorkflow extends PhabricatorStorageManagementWorkflow { protected function didConstruct() { $this ->setName('shell') ->setExamples('**shell** [__options__]') ->setSynopsis(pht('Launch an interactive shell.')); } protected function isRea...
php
Apache-2.0
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/src/infrastructure/storage/management/workflow/PhabricatorStorageManagementProbeWorkflow.php
src/infrastructure/storage/management/workflow/PhabricatorStorageManagementProbeWorkflow.php
<?php final class PhabricatorStorageManagementProbeWorkflow extends PhabricatorStorageManagementWorkflow { protected function didConstruct() { $this ->setName('probe') ->setExamples('**probe**') ->setSynopsis(pht('Show approximate table sizes.')); } protected function isReadOnlyWorkflow...
php
Apache-2.0
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/src/infrastructure/storage/management/workflow/PhabricatorStorageManagementRenamespaceWorkflow.php
src/infrastructure/storage/management/workflow/PhabricatorStorageManagementRenamespaceWorkflow.php
<?php final class PhabricatorStorageManagementRenamespaceWorkflow extends PhabricatorStorageManagementWorkflow { protected function didConstruct() { $this ->setName('renamespace') ->setExamples( '**renamespace** [__options__] '. '--input __dump.sql__ --from __old__ --to __new__ > _...
php
Apache-2.0
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/src/infrastructure/storage/management/workflow/PhabricatorStorageManagementDatabasesWorkflow.php
src/infrastructure/storage/management/workflow/PhabricatorStorageManagementDatabasesWorkflow.php
<?php final class PhabricatorStorageManagementDatabasesWorkflow extends PhabricatorStorageManagementWorkflow { protected function didConstruct() { $this ->setName('databases') ->setExamples('**databases** [__options__]') ->setSynopsis(pht('List databases.')); } protected function isRead...
php
Apache-2.0
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/src/infrastructure/storage/management/workflow/PhabricatorStorageManagementUpgradeWorkflow.php
src/infrastructure/storage/management/workflow/PhabricatorStorageManagementUpgradeWorkflow.php
<?php final class PhabricatorStorageManagementUpgradeWorkflow extends PhabricatorStorageManagementWorkflow { protected function didConstruct() { $this ->setName('upgrade') ->setExamples('**upgrade** [__options__]') ->setSynopsis(pht('Upgrade database schemata.')) ->setArguments( ...
php
Apache-2.0
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/src/infrastructure/storage/management/workflow/PhabricatorStorageManagementDumpWorkflow.php
src/infrastructure/storage/management/workflow/PhabricatorStorageManagementDumpWorkflow.php
<?php final class PhabricatorStorageManagementDumpWorkflow extends PhabricatorStorageManagementWorkflow { protected function didConstruct() { $this ->setName('dump') ->setExamples('**dump** [__options__]') ->setSynopsis(pht('Dump all data in storage to stdout.')) ->setArguments( ...
php
Apache-2.0
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/src/infrastructure/storage/management/workflow/PhabricatorStorageManagementPartitionWorkflow.php
src/infrastructure/storage/management/workflow/PhabricatorStorageManagementPartitionWorkflow.php
<?php final class PhabricatorStorageManagementPartitionWorkflow extends PhabricatorStorageManagementWorkflow { protected function didConstruct() { $this ->setName('partition') ->setExamples('**partition** [__options__]') ->setSynopsis(pht('Commit partition configuration to databases.')) ...
php
Apache-2.0
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/src/infrastructure/storage/management/workflow/PhabricatorStorageManagementDestroyWorkflow.php
src/infrastructure/storage/management/workflow/PhabricatorStorageManagementDestroyWorkflow.php
<?php final class PhabricatorStorageManagementDestroyWorkflow extends PhabricatorStorageManagementWorkflow { protected function didConstruct() { $this ->setName('destroy') ->setExamples('**destroy** [__options__]') ->setSynopsis(pht('Permanently destroy all storage and data.')) ->setAr...
php
Apache-2.0
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/src/infrastructure/storage/lisk/PhabricatorLiskDAO.php
src/infrastructure/storage/lisk/PhabricatorLiskDAO.php
<?php /** * @task config Configuring Storage */ abstract class PhabricatorLiskDAO extends LiskDAO { private static $namespaceStack = array(); private $forcedNamespace; const ATTACHABLE = '<attachable>'; const CONFIG_APPLICATION_SERIALIZERS = 'phabricator/serializers'; /* -( Configuring Storage )--------...
php
Apache-2.0
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/src/infrastructure/storage/lisk/LiskEphemeralObjectException.php
src/infrastructure/storage/lisk/LiskEphemeralObjectException.php
<?php final class LiskEphemeralObjectException 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/storage/lisk/PhabricatorQueryIterator.php
src/infrastructure/storage/lisk/PhabricatorQueryIterator.php
<?php final class PhabricatorQueryIterator extends PhutilBufferedIterator { private $query; private $pager; public function __construct(PhabricatorCursorPagedPolicyAwareQuery $query) { $this->query = $query; } protected function didRewind() { $pager = new AphrontCursorPagerView(); $page_size ...
php
Apache-2.0
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/src/infrastructure/storage/lisk/LiskMigrationIterator.php
src/infrastructure/storage/lisk/LiskMigrationIterator.php
<?php /** * Iterate over every object of a given type, without holding all of them in * memory. This is useful for performing database migrations. * * $things = new LiskMigrationIterator(new LiskThing()); * foreach ($things as $thing) { * // do something * } * * NOTE: This only works on objects with...
php
Apache-2.0
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/src/infrastructure/storage/lisk/LiskRawMigrationIterator.php
src/infrastructure/storage/lisk/LiskRawMigrationIterator.php
<?php final class LiskRawMigrationIterator extends PhutilBufferedIterator { private $conn; private $table; private $cursor; private $column = 'id'; public function __construct(AphrontDatabaseConnection $conn, $table) { $this->conn = $conn; $this->table = $table; } protected function didRewind(...
php
Apache-2.0
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/src/infrastructure/storage/lisk/PhabricatorDataNotAttachedException.php
src/infrastructure/storage/lisk/PhabricatorDataNotAttachedException.php
<?php final class PhabricatorDataNotAttachedException extends Exception { public function __construct($object) { $stack = debug_backtrace(); // Shift off `PhabricatorDataNotAttachedException::__construct()`. array_shift($stack); // Shift off `PhabricatorLiskDAO::assertAttached()`. array_shift($...
php
Apache-2.0
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/src/infrastructure/storage/lisk/LiskDAO.php
src/infrastructure/storage/lisk/LiskDAO.php
<?php /** * Simple object-authoritative data access object that makes it easy to build * stuff that you need to save to a database. Basically, it means that the * amount of boilerplate code (and, particularly, boilerplate SQL) you need * to write is greatly reduced. * * Lisk makes it fairly easy to build somethi...
php
Apache-2.0
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
true
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/src/infrastructure/storage/lisk/PhabricatorLiskSerializer.php
src/infrastructure/storage/lisk/PhabricatorLiskSerializer.php
<?php abstract class PhabricatorLiskSerializer extends Phobject { abstract public function willReadValue($value); abstract public function willWriteValue($value); }
php
Apache-2.0
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/src/infrastructure/storage/lisk/__tests__/LiskChunkTestCase.php
src/infrastructure/storage/lisk/__tests__/LiskChunkTestCase.php
<?php final class LiskChunkTestCase extends PhabricatorTestCase { public function testSQLChunking() { $fragments = array( 'a', 'a', 'b', 'b', 'ccc', 'dd', 'e', ); $this->assertEqual( array( array('a'), array('a'), array('b'), ...
php
Apache-2.0
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/src/infrastructure/storage/lisk/__tests__/LiskFixtureTestCase.php
src/infrastructure/storage/lisk/__tests__/LiskFixtureTestCase.php
<?php final class LiskFixtureTestCase extends PhabricatorTestCase { protected function getPhabricatorTestCaseConfiguration() { return array( self::PHABRICATOR_TESTCONFIG_BUILD_STORAGE_FIXTURES => true, ); } public function testTransactionalIsolation1of2() { // NOTE: These tests are verifying ...
php
Apache-2.0
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/src/infrastructure/storage/lisk/__tests__/LiskDAOTestCase.php
src/infrastructure/storage/lisk/__tests__/LiskDAOTestCase.php
<?php final class LiskDAOTestCase extends PhabricatorTestCase { public function testCheckProperty() { $scratch = new HarbormasterScratchTable(); $scratch->getData(); $this->assertException('Exception', array($this, 'getData')); } public function getData() { $isolation = new LiskIsolationTestDA...
php
Apache-2.0
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/src/infrastructure/storage/lisk/__tests__/LiskIsolationTestDAO.php
src/infrastructure/storage/lisk/__tests__/LiskIsolationTestDAO.php
<?php final class LiskIsolationTestDAO extends LiskDAO { protected $name; protected $phid; protected function getConfiguration() { return array( self::CONFIG_AUX_PHID => true, ) + parent::getConfiguration(); } public function generatePHID() { return PhabricatorPHID::generateNewPHID('TISO...
php
Apache-2.0
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/src/infrastructure/storage/lisk/__tests__/LiskIsolationTestCase.php
src/infrastructure/storage/lisk/__tests__/LiskIsolationTestCase.php
<?php final class LiskIsolationTestCase extends PhabricatorTestCase { public function testIsolatedWrites() { $dao = new LiskIsolationTestDAO(); $this->assertEqual(null, $dao->getID(), pht('Expect no ID.')); $this->assertEqual(null, $dao->getPHID(), pht('Expect no PHID.')); $dao->save(); // Effects...
php
Apache-2.0
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/src/infrastructure/storage/lisk/__tests__/LiskIsolationTestDAOException.php
src/infrastructure/storage/lisk/__tests__/LiskIsolationTestDAOException.php
<?php final class LiskIsolationTestDAOException 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/storage/xsprintf/qsprintf.php
src/infrastructure/storage/xsprintf/qsprintf.php
<?php /** * Format an SQL query. This function behaves like `sprintf`, except that all * the normal conversions (like "%s") will be properly escaped, and additional * conversions are supported: * * %nd, %ns, %nf, %nB * "Nullable" versions of %d, %s, %f and %B. Will produce 'NULL' if the * argument is ...
php
Apache-2.0
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/src/infrastructure/storage/xsprintf/queryfx.php
src/infrastructure/storage/xsprintf/queryfx.php
<?php function queryfx(AphrontDatabaseConnection $conn, $sql /* , ... */) { $argv = func_get_args(); $query = call_user_func_array('qsprintf', $argv); $conn->setLastActiveEpoch(time()); $conn->executeQuery($query); } function queryfx_all(AphrontDatabaseConnection $conn, $sql /* , ... */) { $argv = func_get...
php
Apache-2.0
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/src/infrastructure/storage/xsprintf/PhutilQsprintfInterface.php
src/infrastructure/storage/xsprintf/PhutilQsprintfInterface.php
<?php interface PhutilQsprintfInterface { public function escapeBinaryString($string); public function escapeUTF8String($string); public function escapeColumnName($string); public function escapeMultilineComment($string); public function escapeStringForLikeClause($string); }
php
Apache-2.0
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/src/infrastructure/storage/xsprintf/AphrontDatabaseTableRefInterface.php
src/infrastructure/storage/xsprintf/AphrontDatabaseTableRefInterface.php
<?php interface AphrontDatabaseTableRefInterface { public function getAphrontRefDatabaseName(); public function getAphrontRefTableName(); }
php
Apache-2.0
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/src/infrastructure/storage/xsprintf/PhutilQueryString.php
src/infrastructure/storage/xsprintf/PhutilQueryString.php
<?php final class PhutilQueryString extends Phobject { private $maskedString; private $unmaskedString; public function __construct(PhutilQsprintfInterface $escaper, array $argv) { // Immediately render the query into a static scalar value. // This makes sure we throw immediately if there are errors in...
php
Apache-2.0
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/src/infrastructure/storage/xsprintf/AphrontDatabaseTableRef.php
src/infrastructure/storage/xsprintf/AphrontDatabaseTableRef.php
<?php final class AphrontDatabaseTableRef extends Phobject implements AphrontDatabaseTableRefInterface { private $database; private $table; public function __construct($database, $table) { $this->database = $database; $this->table = $table; } public function getAphrontRefDatabaseName() { r...
php
Apache-2.0
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/src/infrastructure/storage/exception/AphrontQueryException.php
src/infrastructure/storage/exception/AphrontQueryException.php
<?php /** * @concrete-extensible */ class AphrontQueryException 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/storage/exception/AphrontQueryTimeoutQueryException.php
src/infrastructure/storage/exception/AphrontQueryTimeoutQueryException.php
<?php final class AphrontQueryTimeoutQueryException extends AphrontRecoverableQueryException {}
php
Apache-2.0
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/src/infrastructure/storage/exception/AphrontNotSupportedQueryException.php
src/infrastructure/storage/exception/AphrontNotSupportedQueryException.php
<?php final class AphrontNotSupportedQueryException extends AphrontQueryException {}
php
Apache-2.0
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/src/infrastructure/storage/exception/AphrontInvalidCredentialsQueryException.php
src/infrastructure/storage/exception/AphrontInvalidCredentialsQueryException.php
<?php final class AphrontInvalidCredentialsQueryException extends AphrontQueryException {}
php
Apache-2.0
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/src/infrastructure/storage/exception/AphrontConnectionQueryException.php
src/infrastructure/storage/exception/AphrontConnectionQueryException.php
<?php final class AphrontConnectionQueryException extends AphrontQueryException {}
php
Apache-2.0
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/src/infrastructure/storage/exception/AphrontCharacterSetQueryException.php
src/infrastructure/storage/exception/AphrontCharacterSetQueryException.php
<?php final class AphrontCharacterSetQueryException extends AphrontQueryException {}
php
Apache-2.0
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/src/infrastructure/storage/exception/AphrontDuplicateKeyQueryException.php
src/infrastructure/storage/exception/AphrontDuplicateKeyQueryException.php
<?php final class AphrontDuplicateKeyQueryException extends AphrontQueryException {}
php
Apache-2.0
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/src/infrastructure/storage/exception/AphrontParameterQueryException.php
src/infrastructure/storage/exception/AphrontParameterQueryException.php
<?php final class AphrontParameterQueryException extends AphrontQueryException { private $query; public function __construct($query, $message) { parent::__construct(pht('%s Query: %s', $message, $query)); $this->query = $query; } public function getQuery() { return $this->query; } }
php
Apache-2.0
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/src/infrastructure/storage/exception/AphrontLockTimeoutQueryException.php
src/infrastructure/storage/exception/AphrontLockTimeoutQueryException.php
<?php final class AphrontLockTimeoutQueryException extends AphrontRecoverableQueryException {}
php
Apache-2.0
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/src/infrastructure/storage/exception/AphrontDeadlockQueryException.php
src/infrastructure/storage/exception/AphrontDeadlockQueryException.php
<?php final class AphrontDeadlockQueryException extends AphrontRecoverableQueryException {}
php
Apache-2.0
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/src/infrastructure/storage/exception/AphrontConnectionLostQueryException.php
src/infrastructure/storage/exception/AphrontConnectionLostQueryException.php
<?php final class AphrontConnectionLostQueryException extends AphrontRecoverableQueryException {}
php
Apache-2.0
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/src/infrastructure/storage/exception/AphrontCountQueryException.php
src/infrastructure/storage/exception/AphrontCountQueryException.php
<?php final class AphrontCountQueryException extends AphrontQueryException {}
php
Apache-2.0
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/src/infrastructure/storage/exception/AphrontSchemaQueryException.php
src/infrastructure/storage/exception/AphrontSchemaQueryException.php
<?php final class AphrontSchemaQueryException extends AphrontQueryException {}
php
Apache-2.0
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/src/infrastructure/storage/exception/AphrontObjectMissingQueryException.php
src/infrastructure/storage/exception/AphrontObjectMissingQueryException.php
<?php final class AphrontObjectMissingQueryException extends AphrontQueryException {}
php
Apache-2.0
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/src/infrastructure/storage/exception/AphrontRecoverableQueryException.php
src/infrastructure/storage/exception/AphrontRecoverableQueryException.php
<?php abstract class AphrontRecoverableQueryException extends AphrontQueryException {}
php
Apache-2.0
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/src/infrastructure/storage/exception/AphrontAccessDeniedQueryException.php
src/infrastructure/storage/exception/AphrontAccessDeniedQueryException.php
<?php final class AphrontAccessDeniedQueryException extends AphrontQueryException {}
php
Apache-2.0
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/src/infrastructure/storage/patch/PhabricatorSQLPatchList.php
src/infrastructure/storage/patch/PhabricatorSQLPatchList.php
<?php abstract class PhabricatorSQLPatchList extends Phobject { abstract public function getNamespace(); abstract public function getPatches(); /** * Examine a directory for `.php` and `.sql` files and build patch * specifications for them. */ protected function buildPatchesFromDirectory($directory)...
php
Apache-2.0
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/src/infrastructure/storage/patch/PhabricatorBuiltinPatchList.php
src/infrastructure/storage/patch/PhabricatorBuiltinPatchList.php
<?php final class PhabricatorBuiltinPatchList extends PhabricatorSQLPatchList { public function getNamespace() { return 'phabricator'; } private function getPatchPath($file) { $root = dirname(phutil_get_library_root('phabricator')); $path = $root.'/resources/sql/patches/'.$file; // Make sure i...
php
Apache-2.0
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/src/infrastructure/storage/connection/AphrontIsolatedDatabaseConnection.php
src/infrastructure/storage/connection/AphrontIsolatedDatabaseConnection.php
<?php final class AphrontIsolatedDatabaseConnection extends AphrontDatabaseConnection { private $configuration; private static $nextInsertID; private $insertID; private $transcript = array(); private $allResults; private $affectedRows; public function __construct(array $configuration) { $this->...
php
Apache-2.0
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/src/infrastructure/storage/connection/AphrontDatabaseConnection.php
src/infrastructure/storage/connection/AphrontDatabaseConnection.php
<?php /** * @task xaction Transaction Management */ abstract class AphrontDatabaseConnection extends Phobject implements PhutilQsprintfInterface { private $transactionState; private $readOnly; private $queryTimeout; private $locks = array(); private $lastActiveEpoch; private $persistent; abstrac...
php
Apache-2.0
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/src/infrastructure/storage/connection/AphrontDatabaseTransactionState.php
src/infrastructure/storage/connection/AphrontDatabaseTransactionState.php
<?php /** * Represents current transaction state of a connection. */ final class AphrontDatabaseTransactionState extends Phobject { private $depth = 0; private $readLockLevel = 0; private $writeLockLevel = 0; public function getDepth() { return $this->depth; } public function increase...
php
Apache-2.0
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/src/infrastructure/storage/connection/mysql/AphrontBaseMySQLDatabaseConnection.php
src/infrastructure/storage/connection/mysql/AphrontBaseMySQLDatabaseConnection.php
<?php abstract class AphrontBaseMySQLDatabaseConnection extends AphrontDatabaseConnection { private $configuration; private $connection; private $connectionPool = array(); private $lastResult; private $nextError; const CALLERROR_QUERY = 777777; const CALLERROR_CONNECT = 777778; abstract protected...
php
Apache-2.0
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/src/infrastructure/storage/connection/mysql/AphrontMySQLiDatabaseConnection.php
src/infrastructure/storage/connection/mysql/AphrontMySQLiDatabaseConnection.php
<?php /** * @phutil-external-symbol class mysqli */ final class AphrontMySQLiDatabaseConnection extends AphrontBaseMySQLDatabaseConnection { private $connectionOpen = false; public function escapeUTF8String($string) { $this->validateUTF8String($string); return $this->escapeBinaryString($string); } ...
php
Apache-2.0
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/src/infrastructure/storage/__tests__/AphrontIsolatedDatabaseConnectionTestCase.php
src/infrastructure/storage/__tests__/AphrontIsolatedDatabaseConnectionTestCase.php
<?php final class AphrontIsolatedDatabaseConnectionTestCase extends PhabricatorTestCase { protected function getPhabricatorTestCaseConfiguration() { return array( // We disable this here because this test is unique (it is testing that // isolation actually occurs) and must establish a live connect...
php
Apache-2.0
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/src/infrastructure/storage/__tests__/QueryFormattingTestCase.php
src/infrastructure/storage/__tests__/QueryFormattingTestCase.php
<?php final class QueryFormattingTestCase extends PhabricatorTestCase { public function testQueryFormatting() { $conn = id(new PhabricatorUser())->establishConnection('r'); $this->assertEqual( 'NULL', (string)qsprintf($conn, '%nd', null)); $this->assertEqual( '0', (string)qspri...
php
Apache-2.0
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/src/infrastructure/storage/__tests__/AphrontMySQLDatabaseConnectionTestCase.php
src/infrastructure/storage/__tests__/AphrontMySQLDatabaseConnectionTestCase.php
<?php final class AphrontMySQLDatabaseConnectionTestCase extends PhabricatorTestCase { protected function getPhabricatorTestCaseConfiguration() { return array( // We disable this here because we're testing live MySQL connections. self::PHABRICATOR_TESTCONFIG_ISOLATE_LISK => false, ); } pu...
php
Apache-2.0
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/src/infrastructure/storage/future/QueryFuture.php
src/infrastructure/storage/future/QueryFuture.php
<?php /** * This class provides several approaches for querying data from the database: * * # Async queries: Used under MySQLi with MySQLnd. * # Parallel queries: Used under HPHP. * # Multi queries: Used under MySQLi or HPHP. * # Single queries: Used under MySQL. * * The class automatically decides whi...
php
Apache-2.0
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/src/infrastructure/storage/schema/PhabricatorStorageSchemaSpec.php
src/infrastructure/storage/schema/PhabricatorStorageSchemaSpec.php
<?php final class PhabricatorStorageSchemaSpec extends PhabricatorConfigSchemaSpec { public function buildSchemata() { $this->buildRawSchema( 'meta_data', 'patch_status', array( 'patch' => 'text128', 'applied' => 'uint32', 'duration' => 'uint64?', ), array...
php
Apache-2.0
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/src/infrastructure/management/PhabricatorManagementWorkflow.php
src/infrastructure/management/PhabricatorManagementWorkflow.php
<?php abstract class PhabricatorManagementWorkflow extends PhutilArgumentWorkflow { public function isExecutable() { return true; } public function getViewer() { // Some day, we might provide a more general viewer mechanism to scripts. // For now, workflows can call this method for convenience and ...
php
Apache-2.0
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/src/infrastructure/util/PhabricatorSlug.php
src/infrastructure/util/PhabricatorSlug.php
<?php final class PhabricatorSlug extends Phobject { public static function normalizeProjectSlug($slug) { $slug = str_replace('/', ' ', $slug); $slug = self::normalize($slug, $hashtag = true); return rtrim($slug, '/'); } public static function isValidProjectSlug($slug) { $slug = self::normalize...
php
Apache-2.0
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/src/infrastructure/util/PhabricatorSSHKeyGenerator.php
src/infrastructure/util/PhabricatorSSHKeyGenerator.php
<?php final class PhabricatorSSHKeyGenerator extends Phobject { public static function assertCanGenerateKeypair() { $binary = 'ssh-keygen'; if (!Filesystem::resolveBinary($binary)) { throw new Exception( pht( 'Can not generate keys: unable to find "%s" in PATH!', $binary));...
php
Apache-2.0
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/src/infrastructure/util/PhabricatorGlobalLock.php
src/infrastructure/util/PhabricatorGlobalLock.php
<?php /** * Global, MySQL-backed lock. This is a high-reliability, low-performance * global lock. * * The lock is maintained by using GET_LOCK() in MySQL, and automatically * released when the connection terminates. Thus, this lock can safely be used * to control access to shared resources without implementing a...
php
Apache-2.0
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/src/infrastructure/util/PhabricatorHash.php
src/infrastructure/util/PhabricatorHash.php
<?php final class PhabricatorHash extends Phobject { const INDEX_DIGEST_LENGTH = 12; const ANCHOR_DIGEST_LENGTH = 12; /** * Digest a string using HMAC+SHA1. * * Because a SHA1 collision is now known, this method should be considered * weak. Callers should prefer @{method:digestWithNamedKey}. * ...
php
Apache-2.0
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/src/infrastructure/util/PhabricatorMetronome.php
src/infrastructure/util/PhabricatorMetronome.php
<?php /** * Tick at a given frequency with a specifiable offset. * * One use case for this is to flatten out load spikes caused by periodic * service calls. Give each host a metronome that ticks at the same frequency, * but with different offsets. Then, have hosts make service calls only after * their metronome ...
php
Apache-2.0
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/src/infrastructure/util/password/PhabricatorPasswordHasherUnavailableException.php
src/infrastructure/util/password/PhabricatorPasswordHasherUnavailableException.php
<?php final class PhabricatorPasswordHasherUnavailableException 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/util/password/PhabricatorPasswordHasher.php
src/infrastructure/util/password/PhabricatorPasswordHasher.php
<?php /** * Provides a mechanism for hashing passwords, like "iterated md5", "bcrypt", * "scrypt", etc. * * Hashers define suitability and strength, and the system automatically * chooses the strongest available hasher and can prompt users to upgrade as * soon as a stronger hasher is available. * * @task hashe...
php
Apache-2.0
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/src/infrastructure/util/password/PhabricatorIteratedMD5PasswordHasher.php
src/infrastructure/util/password/PhabricatorIteratedMD5PasswordHasher.php
<?php final class PhabricatorIteratedMD5PasswordHasher extends PhabricatorPasswordHasher { public function getHumanReadableName() { return pht('Iterated MD5'); } public function getHashName() { return 'md5'; } public function getHashLength() { return 32; } public function canHashPasswor...
php
Apache-2.0
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/src/infrastructure/util/password/PhabricatorBcryptPasswordHasher.php
src/infrastructure/util/password/PhabricatorBcryptPasswordHasher.php
<?php final class PhabricatorBcryptPasswordHasher extends PhabricatorPasswordHasher { public function getHumanReadableName() { return pht('bcrypt'); } public function getHashName() { return 'bcrypt'; } public function getHashLength() { return 60; } public function canHashPasswords() { ...
php
Apache-2.0
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/src/infrastructure/util/password/__tests__/PhabricatorIteratedMD5PasswordHasherTestCase.php
src/infrastructure/util/password/__tests__/PhabricatorIteratedMD5PasswordHasherTestCase.php
<?php final class PhabricatorIteratedMD5PasswordHasherTestCase extends PhabricatorTestCase { public function testHasher() { $hasher = new PhabricatorIteratedMD5PasswordHasher(); $this->assertEqual( 'md5:4824a35493d8b5dceab36f017d68425f', $hasher->getPasswordHashForStorage( new PhutilO...
php
Apache-2.0
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/src/infrastructure/util/password/__tests__/PhabricatorPasswordHasherTestCase.php
src/infrastructure/util/password/__tests__/PhabricatorPasswordHasherTestCase.php
<?php final class PhabricatorPasswordHasherTestCase extends PhabricatorTestCase { public function testHasherSyntax() { $caught = null; try { PhabricatorPasswordHasher::getHasherForHash( new PhutilOpaqueEnvelope('xxx')); } catch (Exception $ex) { $caught = $ex; } $this->asser...
php
Apache-2.0
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/src/infrastructure/util/__tests__/PhabricatorGlobalLockTestCase.php
src/infrastructure/util/__tests__/PhabricatorGlobalLockTestCase.php
<?php final class PhabricatorGlobalLockTestCase extends PhabricatorTestCase { protected function getPhabricatorTestCaseConfiguration() { return array( self::PHABRICATOR_TESTCONFIG_BUILD_STORAGE_FIXTURES => true, ); } public function testConnectionPoolWithDefaultConnection() { PhabricatorGlo...
php
Apache-2.0
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/src/infrastructure/util/__tests__/PhabricatorHashTestCase.php
src/infrastructure/util/__tests__/PhabricatorHashTestCase.php
<?php final class PhabricatorHashTestCase extends PhabricatorTestCase { public function testHashForIndex() { $map = array( 'dog' => 'Aliif7Qjd5ct', 'cat' => 'toudDsue3Uv8', 'rat' => 'RswaKgTjqOuj', 'bat' => 'rAkJKyX4YdYm', ); foreach ($map as $input => $expect) { $this->as...
php
Apache-2.0
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/src/infrastructure/util/__tests__/PhabricatorMetronomeTestCase.php
src/infrastructure/util/__tests__/PhabricatorMetronomeTestCase.php
<?php final class PhabricatorMetronomeTestCase extends PhabricatorTestCase { public function testMetronomeOffsets() { $cases = array( 'web001.example.net' => 44, 'web002.example.net' => 36, 'web003.example.net' => 25, 'web004.example.net' => 25, 'web005.example.net' => 16, ...
php
Apache-2.0
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/src/infrastructure/util/__tests__/PhabricatorHMACTestCase.php
src/infrastructure/util/__tests__/PhabricatorHMACTestCase.php
<?php final class PhabricatorHMACTestCase extends PhabricatorTestCase { protected function getPhabricatorTestCaseConfiguration() { return array( self::PHABRICATOR_TESTCONFIG_BUILD_STORAGE_FIXTURES => true, ); } public function testHMACKeyGeneration() { $input = 'quack'; $hash_1 = Phabric...
php
Apache-2.0
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/src/infrastructure/util/__tests__/PhabricatorSlugTestCase.php
src/infrastructure/util/__tests__/PhabricatorSlugTestCase.php
<?php final class PhabricatorSlugTestCase extends PhabricatorTestCase { public function testSlugNormalization() { $slugs = array( '' => '/', '/' => '/', '//' => '/', '&&&' => '_/', '/derp/' => 'derp/', '...
php
Apache-2.0
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/src/infrastructure/util/__tests__/PhabricatorPreambleTestCase.php
src/infrastructure/util/__tests__/PhabricatorPreambleTestCase.php
<?php final class PhabricatorPreambleTestCase extends PhabricatorTestCase { /** * @phutil-external-symbol function preamble_get_x_forwarded_for_address */ public function testXForwardedForLayers() { $tests = array( // This is normal behavior with one load balancer. array( 'header' ...
php
Apache-2.0
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/src/infrastructure/lint/linter/PhabricatorJavelinLinter.php
src/infrastructure/lint/linter/PhabricatorJavelinLinter.php
<?php final class PhabricatorJavelinLinter extends ArcanistLinter { private $symbols = array(); private $symbolsBinary; private $haveWarnedAboutBinary; const LINT_PRIVATE_ACCESS = 1; const LINT_MISSING_DEPENDENCY = 2; const LINT_UNNECESSARY_DEPENDENCY = 3; const LINT_UNKNOWN_DEPENDENCY = 4; const LI...
php
Apache-2.0
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/src/infrastructure/env/PhabricatorConfigDefaultSource.php
src/infrastructure/env/PhabricatorConfigDefaultSource.php
<?php /** * Configuration source which reads from defaults defined in the authoritative * configuration definitions. */ final class PhabricatorConfigDefaultSource extends PhabricatorConfigProxySource { public function __construct() { $options = PhabricatorApplicationConfigOptions::loadAllOptions(); $op...
php
Apache-2.0
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false
phorgeit/phorge
https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/src/infrastructure/env/PhabricatorConfigFileSource.php
src/infrastructure/env/PhabricatorConfigFileSource.php
<?php /** * Configuration source which reads from a configuration file on disk (a * PHP file in the `conf/` directory). */ final class PhabricatorConfigFileSource extends PhabricatorConfigProxySource { /** * @phutil-external-symbol function phabricator_read_config_file */ public function __construct($con...
php
Apache-2.0
aceebaa4305332265a371282a841609fe926b819
2026-01-05T04:21:50.722734Z
false