You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
450 B
PHP
23 lines
450 B
PHP
<?php
|
|
|
|
namespace Engelsystem\Renderer;
|
|
|
|
abstract class Engine implements EngineInterface
|
|
{
|
|
/** @var array */
|
|
protected $sharedData = [];
|
|
|
|
/**
|
|
* @param mixed[]|string $key
|
|
* @param null $value
|
|
*/
|
|
public function share($key, $value = null)
|
|
{
|
|
if (!is_array($key)) {
|
|
$key = [$key => $value];
|
|
}
|
|
|
|
$this->sharedData = array_replace_recursive($this->sharedData, $key);
|
|
}
|
|
}
|