public function addMapping($identifier, $class, $property) { if (!class_exists($class)) { throw new \RuntimeException(sprintf('The class "%s" could not be found', $class)); } $this->mappings[$identifier] = [$class, $property]; return $this; }