Completed
Push — master ( 8cebaa...0cc554 )
by Josh
03:33
created

Bundle::configure()

Size

Total Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
nc 1
dl 0
loc 1
ccs 0
cts 0
cp 0
c 0
b 0
f 0
1
<?php
2
3
/**
4
* @package   s9e\TextFormatter
5
* @copyright Copyright (c) 2010-2017 The s9e Authors
6
* @license   http://www.opensource.org/licenses/mit-license.php The MIT License
7
*/
8
namespace s9e\TextFormatter\Configurator;
9
10
use s9e\TextFormatter\Configurator;
11
12
abstract class Bundle
13
{
14
	/**
15
	* Configure a Configurator instance with this bundle's settings
16
	*
17
	* @param  Configurator $configurator
18
	* @return void
19
	*/
20
	abstract public function configure(Configurator $configurator);
21
22
	/**
23
	* Create and return a configured instance of Configurator
24
	*
25
	* @return Configurator
26
	*/
27 1
	public static function getConfigurator()
28
	{
29 1
		$configurator = new Configurator;
30
31
		$bundle  = new static;
32
		$bundle->configure($configurator);
33
34
		return $configurator;
35
	}
36
37
	/**
38
	* Return extra options to be passed to the bundle generator
39
	*
40
	* Used by scripts/generateBundles.php
41
	*
42
	* @return array
43
	*/
44 1
	public static function getOptions()
45
	{
46 1
		return [];
47
	}
48
}