Passed
Push — master ( 9acbb8...d979ac )
by Fabio
05:27
created

THttpRequestParameter::setServiceIDs()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 5
rs 10
1
<?php
2
/**
3
 * THttpRequestParameter classes
4
 *
5
 * @author Brad Anderson <[email protected]>
6
 * @link https://github.com/pradosoft/prado
7
 * @license https://github.com/pradosoft/prado/blob/master/LICENSE
8
 */
9
10
namespace Prado\Web;
11
12
/**
13
 * THttpRequestParameter class.
14
 *
15
 * This is the Event Parameter for {@see THttpRequest::onResolveRequest()} for encapsulating
16
 * the service IDs and URL parameters as part of the event parameter.
17
 *
18
 * @author Brad Anderson <[email protected]>
19
 * @since 4.2.3
20
 */
21
class THttpRequestParameter extends \Prado\TEventParameter
22
{
23
	/**
24
	 * @var array The service IDs associated with the request.
25
	 */
26
	private array $_serviceIDs;
27
28
	/**
29
	 * Constructor.
30
	 *
31
	 * @param array $serviceIDs The service IDs associated with the request.
32
	 * @param array $urlParams The URL parameters of the request.
33
	 */
34
	public function __construct(array $serviceIDs, array $urlParams)
35
	{
36
		$this->setServiceIDs($serviceIDs);
37
		parent::__construct($urlParams);
38
	}
39
40
	/**
41
	 * @return array The Service IDs available in the application.
42
	 */
43
	public function getServiceIDs(): array
44
	{
45
		return $this->_serviceIDs;
46
	}
47
48
	/**
49
	 * @param array $value The Service IDs available in the application.
50
	 * @return static $this
51
	 */
52
	public function setServiceIDs(array $value): static
53
	{
54
		$this->_serviceIDs = $value;
55
56
		return $this;
57
	}
58
}
59