@param $class

@return Domain\RepositoryInterface
19378
public function getRepositoryFor($class)
    {
        $metadata = $this->getMetadataManager()->getMetadataFor($class);
        $repositoryClass = $metadata->getEntityRepositoryClass();
        
        $identity = new ObjectIdentity(sprintf('%s@%s', $repositoryClass, $class));
        
        if (!$this->getClassManager()->hasShared($identity->getIdentifier())) {
            $repository = $this->getClassManager()->createInstanceFor($repositoryClass, ...[$class]);
            $this->getClassManager()->setShared($identity->getIdentifier(), $repository);
        }
        
        return $this->getClassManager()->getShared($identity->getIdentifier());
    }
331675
public function getMetadataFor($class)
    {
        if (isset($this->metadata[$class])) {
            
            $identity = new ObjectIdentity(sprintf('%s@%s', Metadata::class, $class));
            if (!$this->getClassManager()->hasShared($identity->getIdentifier())) {
                /**
                 * @var MetadataInterface $metadata
                 */
                $metadata = $this->getClassManager()->createInstanceFor(Metadata::class, ...[$this->metadata[$class]]);
                $dispatcher = $this->getServiceLocator()->getDispatcher();
                
                $dispatcher->dispatch(ORMEvents::onMetadataLoad, new MetadataLoadEvent($metadata));
                
                $this->getClassManager()->setShared($identity->getIdentifier(), $metadata);
            }
            
            return $this->getClassManager()->getShared($identity->getIdentifier());
        }
        
        throw new NotFoundException('Metadata for ":class" not found', ['class' => $class]);
    }
1146648
protected function resolveOnce($class)
    {
        if (isset($this->instances[$class])) {
            return $this->instances[$class];
        }
        $this->instances[$class] = call_user_func($this->container, $class);

        return $this->instances[$class];
    }
286371
protected function build(string $modelClass): IRepository
    {
        $repositoryClass = $this->registeredRepositories[$modelClass] ?? Repository::class;

        $parameters = [];

        if ($repositoryClass === Repository::class || is_subclass_of($repositoryClass, Repository::class)
        ) {
            $parameters = ['modelClass' => $modelClass];
        }

        return $this->container->make($repositoryClass, $parameters);
    }
904158
public function getClass(string $class){
        if(!class_exists($class)){
            throw new \InvalidArgumentException();
        }

        if(!array_key_exists($class, $this->classes)){
            $this->classes[$class]  = new \ReflectionClass($class);
        }

        return $this->classes[$class];
    }
1067878
private function getObjectMapping(string $class): NormalizationObjectMappingInterface
    {
        try {
            return $this->normalizerObjectMappingRegistry->getObjectMapping($class);
        } catch (SerializerLogicException $exception) {
            $this->logger->error('serialize: {exception}', ['exception' => $exception->getMessage()]);

            throw $exception;
        }
    }
816663
public function getRepository($entityClass)
    {
        $container = $this->getContainer();

        $em = $container->get('doctrine')->getManager();

        /* @var EntityRepository $repository */
        return $em->getRepository($entityClass);
    }
1317348
public function setRepositoryClass($name, $class)
  {
    if (!class_exists($class) || !in_array('SQRT\DB\Repository', class_parents($class))) {
      Exception::ThrowError(Exception::NOT_REPOSITORY, $class);
    }

    $this->repositories[strtolower($name)] = $class;

    return $this;
  }
485016
public function getClassMetadataFor($class)
    {
        if (!array_key_exists($class, $this->loadedMetadata)) {
            $this->loadedMetadata[$class] = $this->metadataFactory->create($class);
        }

        return $this->loadedMetadata[$class];
    }
1291130
public function type($class)
    {
        // Remove leading backslash. All namespaces are assumed absolute in YAML
        $class = ltrim($class, '\\');

        foreach ($this->types as $scaffold) {
            if ($scaffold->getDataObjectClass() === $class) {
                return $scaffold;
            }
        }

        $scaffold = Injector::inst()->create(DataObjectScaffolder::class, $class)
                ->setChainableParent($this);
        $this->types[] = $scaffold;

        return $scaffold;
    }
490622
public function executeClass($class)
    {
        $classReflection = new \ReflectionClass($class);
        $bag = new ExecutedBag();

        $classExecuted = $this->parse($classReflection->getDocComment())
            ->execute();


        $bag->set(
            'properties',
            $this->executeProperties($classReflection->getProperties())
        );

        $methods = $classReflection->getMethods();


        $bag->set('methods',
            $this->executeMethods($methods)
        );


        foreach ($classExecuted as $item => $value) {
            $bag->set($item, $value);
        }

        return $bag;
    }
147595
protected function instance($class)
    {
        $reflection = new \ReflectionClass($class);

        $arguments = array();

        $constructor = $reflection->getConstructor();

        if ($this->container->has($class))
        {
            return $this->container->get($class);
        }

        if ($constructor !== null)
        {
            $arguments = $this->arguments($constructor);
        }

        return $reflection->newInstanceArgs($arguments);
    }
822924
protected function resolve( $class )
	{
		$instance = UniversalBuilder::resolveClass( $class );

		if ( isset( $this->command ) )
			$instance->setCommand( $this->command );

		return $instance;
	}
1180499
public function whenCreating($class)
    {
        if (!isset($this->args[$class])) {
            $this->args[$class] = new ClassMeta($class, $this);
        }

        return $this->args[$class];
    }
571168
private function newInstance($class)
    {
        $entity = $class->newInstance();

        if ($entity instanceof \Doctrine\Common\Persistence\ObjectManagerAware) {
            $entity->injectObjectManager($this->em, $class);
        }

        return $entity;
    }
334553
public function load(string $class): HydratorInterface
    {
        if (isset($this->hydrators[$class])) {
            return $this->hydrators[$class];
        }

        /** @var ClassMetadata $classMetadata */
        $classMetadata = $this->metadataFactory->getMetadataForClass($class);

        if (null === $classMetadata) {
            throw new \RuntimeException(
                'No mapping file was found for class '.$class.
                '. Did you configure the correct paths for serializer?'
            );
        }

        $fqn = $this->configuration->getFQNClassName($classMetadata);

        if (\class_exists($fqn, false)) {
            return $this->hydrators[$class] = $this->factory->newInstance($classMetadata);
        }

        $this->compileAndLoad($classMetadata);

        return $this->hydrators[$class] = $this->factory->newInstance($classMetadata);
    }
209774
public static function fromClassname($class)
    {
        try {
            if (!class_exists($class)) {
                throw new InvalidArgumentException(sprintf('The class "%s" does not exist', $class));
            }

            return new self(ClassUtils::getRealClass($class), 'class');
        } catch (InvalidArgumentException $e) {
            throw new InvalidSubjectIdentityException($e->getMessage(), 0, $e);
        }
    }