Ejemplo n.º 1
0
 public static function execute($uri)
 {
     switch ($uri) {
         case '/':
             return ContentActions::executeHome();
         case '/fund':
             return CreditActions::executeFund();
         case '/get':
             return ContentActions::executeGet();
         case '/postcommit':
             return OpsActions::executePostCommit();
         case '/list-subscribe':
             return MailActions::executeListSubscribe();
         default:
             $noSlashUri = ltrim($uri, '/');
             if (View::exists('page/' . $noSlashUri)) {
                 return ['page/' . $noSlashUri, []];
             } else {
                 return ['page/404', []];
             }
     }
 }
Ejemplo n.º 2
0
 public static function execute($uri)
 {
     switch ($uri) {
         case '/':
             return ContentActions::executeHome();
         case '/fund':
             return CreditActions::executeFund();
         case '/get':
             return ContentActions::executeGet();
         case '/postcommit':
             return OpsActions::executePostCommit();
         case '/list-subscribe':
             return MailActions::executeListSubscribe();
         case '/dl/lbry_setup.sh':
             return static::redirect('https://raw.githubusercontent.com/lbryio/lbry-setup/master/lbry_setup.sh', 307);
         default:
             $noSlashUri = ltrim($uri, '/');
             if (View::exists('page/' . $noSlashUri)) {
                 return ['page/' . $noSlashUri, []];
             } else {
                 return ['page/404', []];
             }
     }
 }