Update Models\ManagerModel
Remove extends from Models\Model.
This commit is contained in:
parent
9f72acea32
commit
d5d271491d
1 changed files with 14 additions and 3 deletions
|
@ -10,21 +10,32 @@ declare(strict_types=1);
|
|||
|
||||
namespace ForkBB\Models;
|
||||
|
||||
use ForkBB\Models\Model;
|
||||
use ForkBB\Core\Container;
|
||||
|
||||
class ManagerModel extends Model
|
||||
class ManagerModel
|
||||
{
|
||||
/**
|
||||
* Контейнер
|
||||
* @var Container
|
||||
*/
|
||||
protected $c;
|
||||
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
protected $repository = [];
|
||||
|
||||
public function __construct(Container $container)
|
||||
{
|
||||
$this->c = $container;
|
||||
}
|
||||
|
||||
public function get($key)
|
||||
{
|
||||
return $this->repository[$key] ?? null;
|
||||
}
|
||||
|
||||
public function set($key, /* mixed */ $value): ManagerModel
|
||||
public function set($key, /* mixed */ $value): self
|
||||
{
|
||||
$this->repository[$key] = $value;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue