24 lines
454 B
PHP
24 lines
454 B
PHP
<?php
|
|
|
|
namespace App\Controllers;
|
|
|
|
use App\Controllers\BaseController;
|
|
|
|
abstract class CommonController extends BaseController
|
|
{
|
|
private $_options = [];
|
|
|
|
final public function __get($name): array|null
|
|
{
|
|
if (!array_key_exists($name, $this->_options)) {
|
|
return null;
|
|
}
|
|
return $this->_options;
|
|
}
|
|
|
|
final public function __set($name, $value): void
|
|
{
|
|
$this->_options[$name] = $value;
|
|
}
|
|
}
|