Returns an entity class name from the provided object id.

@param  string $objectID

@return object
962535
public static function getEntityClassFromObjectID($objectID)
    {
        $type = explode('::', $objectID)[0];

        if (in_array($type, static::getEntities(), true)) {
            return $type;
        }

        throw new EntityNotFoundInObjectID("Entity class from ObjectID {$objectID} not found.");
    }
897651
public function transformEntityId($entityId) {
        if (0 === strpos($entityId, 'HLBLOCK_')) {
            $hlblockId = substr($entityId, 8);
            $hlhelper = new HlblockHelper();
            $hlblock = $hlhelper->getHlblock($hlblockId);
            if (empty($hlblock)) {
                $this->throwException(__METHOD__, '%s not found', $entityId);
            }
            $entityId = 'HLBLOCK_' . $hlblock['NAME'];
        }
        return $entityId;
    }
948122
protected function check_object_id( $object_id ) {
		$term = get_term( $object_id );
		if ( ! $term ) {
			WP_CLI::error( "Could not find the term with ID {$object_id}." );
		}
		return $term->term_id;
	}
99957
public function loadObjectById($objectId, $properties = array())
    {

        $results = $this->getObjectById($objectId, $properties);
        //If success, store the object id in
        $n = 0;
        $object = new Entity($this->database, $this->container);
        $object->definePropertyModel($this->propertyModel);
        //$object->defineValueGroup($this->valueGroup);

        while ($row = $results->fetchAssoc()) {
            foreach ($row as $property => $value):
                if (strtolower($property) == "object_type") {
                    $object->setObjectType($value);
                    continue;
                }
                if (strtolower($property) == "object_id") {
                    $object->setObjectId($value);
                    continue;
                }
                if (strtolower($property) == "object_uri") {
                    $object->setObjectURI($value);
                    continue;
                }
                $object->setPropertyValue($property, $value);
            endforeach;
            $n++;
        }
        return $object;
    }
1080568
protected function getClassNameFromShopMap($classId)
    {
        $shopControllerMapProvider = $this->getShopControllerMapProvider();
        $idToNameMap = $shopControllerMapProvider->getControllerMap();
        $className = $this->arrayLookup($classId, $idToNameMap);

        return $className;
    }
37425
protected function load($entityId)
    {
        $table = $this->getEntityDescriptor()->getTableName();
        $primaryKey = $this->getEntityDescriptor()
            ->getPrimaryKey()
            ->getField();

        return $this->find()
            ->where([
                "{$table}.{$primaryKey} = :id" => [':id' => $entityId]
            ])
            ->first();
    }
1188167
private function getDataKeyByIdentity(ObjectIdentityInterface $oid)
    {
        return $this->prefix.md5($oid->getType()).sha1($oid->getType())
               .'_'.md5($oid->getIdentifier()).sha1($oid->getIdentifier());
    }
1215964
public function objectName($objectName = null)
    {
        if ($objectName === null)
        {
            return $this->_objectName;
        }
        $this->_objectName = $objectName;

        return $this;
    }
629787
public function classname($id)
    {
        # todo -- returns null class instead of null
        return isset($this->classes[$id]) ? $this->classes[$id] : null;
    }
51821
@Beta
    public MSICredentials withObjectId(String objectId) {
        this.objectId = objectId;
        this.clientId = null;
        this.identityId = null;
        return this;
    }
1050153
public function create($objectId)
    {
        //对象配置信息
        $objInfo=$this->getObjInfo($objectId);
        if($objInfo==null){
            throw new \Exception("Call to undefined object '".$objectId."'");
        }

        //如果单例模式且对象已经存在,直接返回
        if($objInfo->singleton && array_key_exists($objectId, $this->m_singletonObjMap)){
            return $this->m_singletonObjMap[$objectId];
        }

        //创建对象
        if(!class_exists($objInfo->class)){
            throw new \Exception("Class '".$objInfo->class."' not found");
        }
        $obj=$this->newInstance($objInfo->class,$objInfo->constructorArgs);

        //注入全局属性(全局属性只有值类型)
        foreach ($this->m_config->getConfigValues(BuiltInConst::GLOBAL_CONFIG_SESSION) as $name=>$value){
            $this->setProperty($obj, $name, $value);
        }

        //注入属性
        foreach ($objInfo->propertyInfos as $name=>$value){
            $this->setProperty($obj, $name, $value);
        }

        //如果为单态模式,则保存到缓存
        if($objInfo->singleton){
            $this->m_singletonObjMap[$objectId]=$obj;
        }

        //通过配置接口注入配置实例
        if($obj instanceof IConfigurable){
            $obj->setConfiguration($this->m_config);
        }

        //返回对象
        return $obj;
    }
600144
public static Class<?> getClass(ObjectIdentifier oid)
            throws CertificateException {
        OIDInfo info = oidMap.get(oid);
        return (info == null) ? null : info.getClazz();
    }
356872
public static function objectId($fieldId)
    {
        //====================================================================//
        // decode
        $result = self::isIdField($fieldId);
        if (empty($result)) {
            return false;
        }
        //====================================================================//
        // Return List Name
        return   $result['ObjectId'];
    }
1338694
public function getObjectInstanceById(ICollection $collection, $objectId)
    {
        $collectionName = $collection->getName();
        if (isset($this->objectsById[$collectionName][$objectId])) {
            return $this->objectsById[$collectionName][$objectId];
        } else {
            return null;
        }
    }
138111
public function getById ($entityId)
    {
        // Check cache first
        if (isset($this->cache[$entityId])) {
            return $this->cache[$entityId];
        }

        $entity = $this->er->findOneById($entityId);
        if (NULL == $entity) {
            throw new Exception("Entity not found: id=$entityId, class=$this->entityClass");
        }

        // Create and store in cache
        $model = $this->_convertEntityToModel($entity);
        $this->cache[$entityId] = $model;

        return $model;
    }
1010708
protected function getNode(ObjectId $oid) {
    $oidStr = $oid->__toString();
    if (!isset($this->deserializedNodes[$oidStr])) {
      $persistenceFacade = ObjectFactory::getInstance('persistenceFacade');
      $type = $oid->getType();
      if ($persistenceFacade->isKnownType($type)) {
        // don't create all values by default (-> don't use PersistenceFacade::create() directly, just for determining the class)
        $class = get_class($persistenceFacade->create($type, BuildDepth::SINGLE));
        $node = new $class;
      }
      else {
        $node = new Node($type);
      }
      $node->setOID($oid);
      $this->deserializedNodes[$oidStr] = $node;
    }
    return $this->deserializedNodes[$oidStr];
  }
857467
protected function loadNode(ObjectId $oid) {
    // check if we already loaded the node
    if ($this->isRegistered($oid)) {
      return;
    }
    $persistenceFacade = $this->getPersistenceFacade();

    // restore the request values from session
    $language = $this->getRequestValue('language');
    $translateValues = StringUtil::getBoolean($this->getRequestValue('translateValues'));

    // load the node
    $node = $persistenceFacade->load($oid);
    if ($node == null) {
      throw new PersistenceException("Can't load node '".$oid."'");
    }

    // translate all nodes to the requested language if requested
    if ($this->isLocalizedRequest()) {
      $localization = $this->getLocalization();
      $node = $localization->loadTranslation($node, $language, true, true);
    }

    // translate values if requested
    if ($translateValues) {
      $nodes = [$node];
      if ($this->isLocalizedRequest()) {
        NodeUtil::translateValues($nodes, $language);
      }
      else {
        NodeUtil::translateValues($nodes);
      }
    }

    // assign it to the response
    $this->addNodeToResponse($node);

    $this->register($oid);

    $logger = $this->getLogger();
    if ($logger->isInfoEnabled()) {
      $logger->info("Loaded: ".$node->getOID());
    }
    if ($logger->isDebugEnabled()) {
      $logger->debug($node->toString());
    }
  }