public function put($data)
	{
		if( ! $data instanceof DataTransferObject)
		{
			throw new Exception('You are trying to put invalid object to trunk.');
		}

		if( ! array_key_exists($data->getType(), $this->storage) )
		{
			$this->storage[$data->getType()] = [];
		}

		$storageKey = $this->storageKey($data->getParams());
		$this->storage[$data->getType()][$storageKey] = $data;
	}
public function put($data)
	{
		if( ! $data instanceof DataTransferObject)
		{
			throw new Exception('You are trying to put invalid object to trunk.');
		}

		if( ! array_key_exists($data->getType(), $this->storage) )
		{
			$this->storage[$data->getType()] = [];
		}

		$storageKey = $this->storageKey($data->getParams());
		$this->storage[$data->getType()][$storageKey] = $data;
	}
public function put ( $ data ) { if ( ! $ data instanceof DataTransferObject ) { throw new Exception ( 'You are trying to put invalid object to trunk.' ) ; } if ( ! array_key_exists ( $ data -> getType ( ) , $ this -> storage ) ) { $ this -> storage [ $ data -> getType ( ) ] = [ ] ; } $ storageKey = $ this -> storageKey ( $ data -> getParams ( ) ) ; $ this -> storage [ $ data -> getType ( ) ] [ $ storageKey ] = $ data ; }
Add item or collection to trunk

@param  mixed  $data

@return void
Add item or collection to trunk