duckbrain/src/Libs/Params.php

23 lines
392 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-17 14:20:58 +01:00
public function __construct($data){
$this->data = (array) $data;
2020-03-08 04:37:19 +01:00
}
2020-03-17 03:54:12 +01:00
public function __isset($index) {
return isset($this->data[$index]);
}
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
}
}
?>