<?php

namespace App\Controllers;

use App\Controllers\BaseController;

abstract class CommonController extends BaseController
{
    private $_datas = [];

    final public function __get($name): array|null
    {
        if (!array_key_exists($name, $this->_datas)) {
            return null;
        }
        return $this->_datas;
    }

    final public function __set($name, $value): void
    {
        $this->_datas[$name] = $value;
    }
}
