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.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

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);
}
}