Changeset View
Changeset View
Standalone View
Standalone View
scripts/aphront/aphrontpath.php
| #!/usr/bin/env php | #!/usr/bin/env php | ||||
| <?php | <?php | ||||
| $root = dirname(dirname(dirname(__FILE__))); | $root = dirname(dirname(dirname(__FILE__))); | ||||
| require_once $root.'/scripts/__init_script__.php'; | require_once $root.'/scripts/__init_script__.php'; | ||||
| if ($argc !== 2 || $argv[1] === '--help') { | if ($argc !== 2 || $argv[1] === '--help') { | ||||
| echo "Usage: aphrontpath.php <url>\n"; | echo pht('Usage: %s', 'aphrontpath.php <url>')."\n"; | ||||
| echo "Purpose: Print controller which will process passed <url>.\n"; | echo pht( | ||||
| "Purpose: Print controller which will process passed %s.\n", | |||||
| '<url>'); | |||||
| exit(1); | exit(1); | ||||
| } | } | ||||
| $url = parse_url($argv[1]); | $url = parse_url($argv[1]); | ||||
| $path = '/'.(isset($url['path']) ? ltrim($url['path'], '/') : ''); | $path = '/'.(isset($url['path']) ? ltrim($url['path'], '/') : ''); | ||||
| $config_key = 'aphront.default-application-configuration-class'; | $config_key = 'aphront.default-application-configuration-class'; | ||||
| $application = PhabricatorEnv::newObjectFromConfig($config_key); | $application = PhabricatorEnv::newObjectFromConfig($config_key); | ||||
| Show All 9 Lines | |||||