protected function getCodeFromIndex($path, $id)
{
if (!isset($this->cache[$path])) {
$this->cache[$path] = $this->loadJson($path);
}
if (!isset($this->cache[$path][$id])) {
throw new ObjectNotFoundException('Cannot find object with id ' . $id);
}
return $this->cache[$path][$id];
}