ILIAS  release_7 Revision v7.30-3-g800a261c036
All Data Structures Namespaces Files Functions Variables Modules Pages
StorageOnPathWrapper.php
Go to the documentation of this file.
1 <?php
2 
3 /* Copyright (c) 2020 Richard Klees <richard.klees@concepts-and-training.de> Extended GPL, see docs/LICENSE */
4 
5 namespace ILIAS\Setup\Metrics;
6 
7 class StorageOnPathWrapper implements Storage
8 {
10 
14  protected $path;
15 
19  protected $other;
20 
21  public function __construct(string $path, Storage $other)
22  {
23  $this->path = $path;
24  $this->other = $other;
25  }
26 
30  public function store(string $key, Metric $metric) : void
31  {
32  $this->other->store("{$this->path}.$key", $metric);
33  }
34 }
trait StorageConvenience
Implements the convenience methods of Storage over Storage::store.
A metric is something we can measure about the system.
Definition: Metric.php:17
__construct(string $path, Storage $other)