/** * @param string $className */ private function validateCollection($className) { if (!$this->collection) { throw new LiteObjectException("Collection of mappers must be set. See method Mapper::setMappersCollection."); } if (!$this->collection->has($className) && !$this->collection->getDefault()) { throw new LiteObjectException("Mappers collection missing map for target class name: {$className}. " . 'And no default mapper defined'); } }