1 <?php
2
3 /*
4 * This file is part of the ICanBoogie package.
5 *
6 * (c) Olivier Laviale <olivier.laviale@gmail.com>
7 *
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
10 */
11
12 namespace ICanBoogie\HTTP;
13
14 /**
15 * Used to defined a dispatcher and its weight.
16 *
17 * <pre>
18 * <?php
19 *
20 * $dispatcher['my'] = new WeightedDispatcher('callback', 'before:that_other_dispatcher');
21 * </pre>
22 */
23 class WeightedDispatcher
24 {
25 public $dispatcher;
26
27 public $weight;
28
29 public function __construct($dispatcher, $weight)
30 {
31 $this->dispatcher = $dispatcher;
32 $this->weight = $weight;
33 }
34 }
35