for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Ffcms\Core\Cache;
use Ffcms\Core\Traits\Singleton;
/**
* Class MemoryObject. Simple singleton-type of magic __set and __get class to store any objects in memory (get and set)
* @package Ffcms\Core\Cache
*/
class MemoryObject
{
use Singleton;
protected $data;
* Set data to store
* @param string $key
* @param mixed $value
public function set($key, $value)
$this->data[$key] = $value;
}
* Get stored data
* @return mixed
public function get($key)
return isset($this->data[$key]) ? $this->data[$key] : null;