duckbrain/src/Libs/Params.php

22 lines
379 B
PHP
Raw Normal View History

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){
return (isset($this->data[$index]) && $this->data[$index] != '') ? $this->data[$index] : null;
2020-03-08 04:37:19 +01:00
}
}
?>