#!/usr/bin/env php ')."\n"; echo pht( "Purpose: Print controller which will process passed %s.\n", ''); exit(1); } $url = parse_url($argv[1]); $path = '/'.(isset($url['path']) ? ltrim($url['path'], '/') : ''); $config_key = 'aphront.default-application-configuration-class'; $application = PhabricatorEnv::newObjectFromConfig($config_key); $application->setRequest(new AphrontRequest('', $path)); list($controller) = $application->buildControllerForPath($path); if (!$controller && substr($path, -1) !== '/') { list($controller) = $application->buildControllerForPath($path.'/'); } if ($controller) { echo get_class($controller)."\n"; }