Get an instance of a class based on a class identifier

@param ObjectIdentifier $identifier
@param bool              $fallback   Use fallbacks when locating the class. Default is TRUE.
@return  string  Return the identifier class or FALSE on failure.
490639
protected function _locate(ObjectIdentifier $identifier, $fallback = true)
    {
        $class = $this->__registry->getClass($identifier);

        //If the class is FALSE we have tried to locate it already, do not locate it again.
        if(empty($class) && ($class !== false))
        {
            $class = $this->_locators[$identifier->getType()]->locate($identifier, $fallback);

            //If we are falling back set the class in the registry
            if($fallback)
            {
                if(!$this->__registry->get($identifier) instanceof ObjectInterface) {
                    $this->__registry->setClass($identifier, $class);
                }
            }
        }

        return $class;
    }
394970
public function getByIdentifier($identifier)
    {
        if (isset($this->nodesByIdentifier[$identifier])) {
            return $this->nodesByIdentifier[$identifier];
        }

        return false;
    }
1322677
public function getReferenceValue($identifier)
    {
        $identifier = $this->getReferenceIdentifier($identifier);
        if (!array_key_exists($identifier, $this->references)) {
            throw new \Exception("No reference set with identifier '$identifier'");
        }

        return $this->references[$identifier];
    }
569281
public function get($identifier = null, $fallback = null) {
		return $this->arrayGet(self::$_data, '_session_class._standard.' . $this->section . ($identifier !== null ? '.' . $identifier : ''), $fallback);
	}
414350
public function get($identifier)
    {
        if (!isset($this->countries[$identifier])) {
            return null;
        }

        return $this->countries[$identifier];
    }
273623
protected function getOneByIdentifier($identifier)
	{
		return $this->aggregate[IdentifierServiceProvider::getProviderKey()]->get([['field' => 'id', 'value' =>  $identifier->getEntityKey(), 'operator' => '=', 'or' => false]]);
	}
1049377
public function getProxy($className, $identifier)
    {
        $proxyClassName = str_replace('\\', '', $className) . 'Proxy';
        $fqn = $this->proxyNamespace . '\\' . $proxyClassName;

        if (! class_exists($fqn, false)) {
            $fileName = $this->proxyDir . DIRECTORY_SEPARATOR . $proxyClassName . '.php';
            if ($this->autoGenerate) {
                $this->generateProxyClass($this->xem->getClassMetadata($className), $proxyClassName, $fileName, self::$proxyClassTemplate);
            }
            require $fileName;
        }

        if ( ! $this->xem->getMetadataFactory()->hasMetadataFor($fqn)) {
            $this->xem->getMetadataFactory()->setMetadataFor($fqn, $this->xem->getClassMetadata($className));
        }

        $documentPersister = $this->xem->getUnitOfWork()->getXmlEntityPersister($className);

        return new $fqn($documentPersister, $identifier);
    }
163832
protected static function getInternal($identifier)
    {
        $ids = explode('.', $identifier);
        $base = &self::$container;

        while ($current = array_shift($ids)) {
            if (is_array($base) && array_key_exists($current, $base)) {
                $base = &$base[$current];
            } else {
                return null;
            }
        }

        $result = $base;

        return $result;
    }
117907
public function findByIdentifier($identifier) {
    foreach ($this->packages as $package) {
      if (S::startsWith($package->getIdentifier(), $identifier)) {
        return $package;
      }
    }
  }
1233455
public function findByIdentifier($identifier)
    {
        if (!isset($this->plugins[$identifier])) {
            $identifier = $this->normalizeIdentifier($identifier);
        }

        if (!isset($this->plugins[$identifier])) {
            return null;
        }

        return $this->plugins[$identifier];
    }
613413
public function getRouteByIdentifier(int $identifier)
    {
        return isset($this->routes[$identifier])
            ? $this->routes[$identifier]
            : null;
    }
1311665
public static function getEntityIdentifier($identifier)
    {
        $identifier = AnService::getIdentifier($identifier);

        if (!$identifier->basepath) {
            $adapters = AnService::get('anahita:loader')->getAdapters();
            $basepath = pick($adapters[$identifier->type]->getBasePath(), ANPATH_BASE);
            $applications = array_flip(AnServiceIdentifier::getApplications());

            if (isset($applications[$basepath])) {
                $identifier->application = $applications[$basepath];
                $identifier->basepath = $basepath;
            }
        }

        return $identifier;
    }
395950
public function getFiles($identifier = null, $fallback = null) {
		return $this->arrayGet($this->_files, $identifier, $fallback);
	}
144008
public function getJobFromId($identifier)
    {
        return array_key_exists($identifier, $this->identifierToId)
            ? $this->jobs[$identifier]
            : null;
    }
1051236
protected static function _identifier(AnServiceIdentifier $identifier)
    {
        $identifier = clone $identifier;

        if (!$identifier->name) {
            $identifier->name = AnInflector::singularize($identifier->package);
        }

        $identifier->type = 'com';
        $identifier->path = array('domain','entity');

        return $identifier;
    }
619494
public static function getInstance($identifier = self::PRIMARY)
    {
        $serviceClassName = get_called_class();


        return self::findOrCreateInstance($serviceClassName, $identifier);
    }
705024
public function getPost($identifier = null, $fallback = null) {
		return $this->arrayGet($this->_post, $identifier, $fallback);
	}