mirror of
https://github.com/monstra-cms/monstra.git
synced 2025-07-31 18:30:20 +02:00
32 lines
483 B
PHP
Executable File
32 lines
483 B
PHP
Executable File
<?php
|
|
namespace Monstra;
|
|
|
|
trait MonstraTrait
|
|
{
|
|
/**
|
|
* @var Monstra
|
|
*/
|
|
protected static $monstra;
|
|
|
|
/**
|
|
* @return Monstra
|
|
*/
|
|
public static function getMonstra()
|
|
{
|
|
if (!self::$monstra) {
|
|
self::$monstra = Monstra::instance();
|
|
}
|
|
|
|
return self::$monstra;
|
|
}
|
|
|
|
|
|
/**
|
|
* @param Monstra $monstra
|
|
*/
|
|
public static function setMonstra(Monstra $monstra)
|
|
{
|
|
self::$monstra = $monstra;
|
|
}
|
|
}
|