storages as $id => $storage) { $output[$id] = $storage['title']; } return $output; } /** * @param $id * * @return array */ public function getStorage($id) { return $this->storages[$id]; } /** * @param $id * @param $title * @param \Symfony\Component\HttpKernel\Profiler\ProfilerStorageInterface $storage */ public function addStorage($id, $title, ProfilerStorageInterface $storage) { $this->storages[$id] = [ 'title' => $title, 'class' => $storage, ]; } }