set() public method

Inspired by laravel's config repository class.
public set ( array | string $key, mixed $value = null )
$key array | string
$value mixed
 /**
  * Add data to the data layer.
  *
  * @param array|string $key
  * @param mixed        $value
  */
 public function set($key, $value = null)
 {
     $this->dataLayer->set($key, $value);
 }
 /**
  * Add data to the data layer for the next request.
  * 
  * @param array|string $key
  * @param mixed        $value
  */
 public function flash($key, $value = null)
 {
     $this->flashDataLayer->set($key, $value);
 }