Completed
Pull Request — master (#52)
by rxu
04:00
created

customsitescollection::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
1
<?php
2
/**
3
 *
4
 * phpBB Media Embed PlugIn extension for the phpBB Forum Software package.
5
 *
6
 * @copyright (c) 2019 phpBB Limited <https://www.phpbb.com>
7
 * @license GNU General Public License, version 2 (GPL-2.0)
8
 *
9
 */
10
11
namespace phpbb\mediaembed\collection;
12
13
use s9e\TextFormatter\Plugins\MediaEmbed\Configurator\Collections\XmlFileDefinitionCollection;
14
15
class customsitescollection
16
{
17
	/** @var string $root_path */
18
	protected $root_path;
19
20
	/**
21
	 * Constructor
22
	 *
23
	 * @param string $phpbb_root_path
24
	 */
25
	public function __construct($phpbb_root_path)
26
	{
27
		$this->root_path = $phpbb_root_path;
28
	}
29
30
	/**
31
	 * Get custom XML site definitions collection object
32
	 *
33
	 * @return object XmlFileDefinitionCollection
34
	 */
35
	public function get_custom_sites_collection()
36
	{
37
		return new XmlFileDefinitionCollection($this->root_path . 'ext/phpbb/mediaembed/collection/xml');
38
	}
39
}
40