cache = $cache; $this->schema = $schema; } protected function instantiate(string $class, array $data): object { $primaryKey = ColumnMapper::getPrimaryKeyColumnName($class); $object = $this->cache->get($class, $data[$primaryKey]) ?: ProxyFactory::create($class); $this->cache->set($class, $data[$primaryKey], $object); return $object; } protected function getSchema(): SchemaInterface { return $this->schema; } }