-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDataRetrievalPolicy.php
34 lines (32 loc) · 1.09 KB
/
DataRetrievalPolicy.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<?php
namespace phpWTL;
/**
* Representation of a single policy for data retrieval.
*
* Data retrieval policies may be used by loggers and data retrievers alike to allow for user-driven complex off-standard bahavior in the process of logging data retrieval.
*
* @author Michael Beyer <[email protected]>
* @version v0.1.0
* @api
*/
class DataRetrievalPolicy {
/** @var string $name Policy id. */
public $name= null;
/** @var string $flag Specify behavior of this policy. */
public $flag= null;
/** @var string $parameter Can be used to parameterize a policy bahavior (the parameter might be any type, non-scalar and two-ways). */
public $parameter= null;
/**
* @param array $param Associative array to provide all attributes.
*
* @author Michael Beyer <[email protected]>
* @version v0.1.0
* @api
*/
public function __construct($param) {
$this->name= array_key_exists('name', $param) ? $param['name'] : "";
$this->flag= array_key_exists('flag', $param) ? $param['flag'] : "";
$this->parameter= array_key_exists('parameter', $param) ? $param['parameter'] : "";
}
}
?>