public function registerDoctrineLazyLoader($entityClass, LazyLoaderInterface $loader)
    {
        if (!is_a($entityClass, LazyPropertiesInterface::class, true)) {
            throw new \InvalidArgumentException(sprintf(
                'Class %s has to implement %s to be able to lazy load her properties.',
                $entityClass,
                LazyPropertiesInterface::class
            ));
        }

        $this->loaders->set($entityClass, $loader);
    }
public function registerDoctrineLazyLoader($entityClass, LazyLoaderInterface $loader)
    {
        if (!is_a($entityClass, LazyPropertiesInterface::class, true)) {
            throw new \InvalidArgumentException(sprintf(
                'Class %s has to implement %s to be able to lazy load her properties.',
                $entityClass,
                LazyPropertiesInterface::class
            ));
        }

        $this->loaders->set($entityClass, $loader);
    }
public function registerDoctrineLazyLoader ( $ entityClass , LazyLoaderInterface $ loader ) { if ( ! is_a ( $ entityClass , LazyPropertiesInterface :: class , true ) ) { throw new \ InvalidArgumentException ( sprintf ( 'Class %s has to implement %s to be able to lazy load her properties.' , $ entityClass , LazyPropertiesInterface :: class ) ) ; } $ this -> loaders -> set ( $ entityClass , $ loader ) ; }
Register a loader for given entity class.

@param string $entityClass
@param string $loader
Register a loader for given entity class .