2020-03-08 04:37:19 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Libs;
|
|
|
|
|
|
|
|
class Params {
|
2020-03-14 03:41:48 +01:00
|
|
|
|
|
|
|
private $data;
|
|
|
|
|
2020-03-08 04:37:19 +01:00
|
|
|
public function __construct($args){
|
2020-03-14 03:41:48 +01:00
|
|
|
$this->data = [];
|
2020-03-08 04:37:19 +01:00
|
|
|
foreach($args as $index => $value){
|
2020-03-14 03:41:48 +01:00
|
|
|
$this->data[$index] = $value;
|
2020-03-08 04:37:19 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
public function __get($index){
|
2020-03-15 00:54:57 +01:00
|
|
|
return (isset($this->data[$index]) && $this->data[$index] != '') ? $this->data[$index] : null;
|
2020-03-08 04:37:19 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
?>
|