File manager - Edit - /usr/local/prospamfilter/vendor/codeception/codeception/tests/data/services/UserModel.php
Back
<?php require_once __DIR__.'/../app/data.php'; class UserModel { protected $id; protected $data = array(); protected $saved = false; public function getName() { return $this->data['name']; } function setName($name) { $this->data['name'] = 'Mr. '.$name; } function getId() { return $this->id; } function get($param) { if (!isset($this->data[$param])) throw new \Exception('Key does not exist!'); return $this->data[$param]; } function set($param, $value) { $this->data[$param] = $value; } function save() { if (!$this->id) $this->id = uniqid(); data::set($this->id, $this->data); $this->saved = true; return true; } }
| ver. 1.4 |
Github
|
.
| PHP 8.2.30 | Generation time: 0 |
proxy
|
phpinfo
|
Settings