3 * Copyright (c) 2014, Facebook, Inc.
6 * This source code is licensed under the BSD-style license found in the
7 * LICENSE file in the "hack" directory of this source tree. An additional grant
8 * of patent rights can be found in the PATENTS file in the same directory.
12 class WebHelp2Controller
{
13 public static function empty(): ?WebHelp2Controller
{
16 public function foo(): void
{}
18 class WebHelp2HubController
extends WebHelp2Controller
{}
19 class WebHelp2PageController
extends WebHelp2Controller
{}
20 class WebHelp2FrequentQuestionController
extends WebHelp2Controller
{}
23 function test(string $huri, bool $cmsid): WebHelp2Controller
{
24 $controller = Vector();
28 $controller[] = new WebHelp2HubController();
31 $controller[] = new WebHelp2PageController();
34 $controller[] = new WebHelp2FrequentQuestionController();
37 throw new Exception('You shouldn\'t be here');
39 $controller[0]->foo();
40 return $controller[0];