Get item object from storage
@param string $sClassName
@param int    $iElementID
@return ElementItem|null
511451
public static function get($sClassName, $iElementID)
    {
        $sKey = self::getKey($sClassName, $iElementID);
        if (isset(self::$arItemStore[$sKey]) && self::$arItemStore[$sKey] instanceof ElementItem) {
            return clone self::$arItemStore[$sKey];
        }

        return null;
    }
911904
public function getElement($className)
    {
        if ($file = $this->findMappingFile($className)) {
            $result = $this->loadMappingFile($file);
            return $result[$className];
        }
        return false;
    }
1366618
public function get($className = null)
    {
        $this->parseDefer();
        if(!$this->isSuccess)
        {
            throw new \RuntimeException('Result is not success!');
        }
        $result = $this->statement->fetch();
        if(false === $result)
        {
            return null;
        }

        if(null === $className)
        {
            $className = $this->modelClass;
        }
        if(null === $className)
        {
            return $result;
        }
        else
        {
            if(is_subclass_of($className, Model::class))
            {
                $object = BeanFactory::newInstance($className, $result);
            }
            else
            {
                $object = BeanFactory::newInstance($className);
                foreach($result as $k => $v)
                {
                    $object->$k = $v;
                }
            }
            if(is_subclass_of($object, IEvent::class))
            {
                $className = BeanFactory::getObjectClass($object);
                $object->trigger(ModelEvents::AFTER_QUERY, [
                    'model'      =>  $object,
                ], $object, AfterQueryEventParam::class);
            }
            return $object;
        }
    }
966292
public function get_old_parentid($itemname) {
        return array_key_exists($itemname, $this->elementsoldid) ? $this->elementsoldid[$itemname] : null;
    }
699687
public function onGetData()
    {
        $iElementID = Input::get('element_id');
        $obElementItem = $this->makeItem($iElementID);

        return $obElementItem->toArray();
    }
304797
private <T> T getItem(String itemName, Map<String, T> items, String typeName) {
		T item = items.get(itemName);
		if (item == null) {
			throw new FuzzerException(name + ": " + typeName + " '" + itemName + "' not found");
		}
		return item;
	}
103438
protected function findItem($tableName,$itemId)
  {
    $tableAlias = $this->getTableAlias($tableName);

    $qb = $this->dbConn->createQueryBuilder();
    $qb->select($this->getTableSelects($tableName,$tableAlias));
    $qb->from($tableName,$tableAlias);

    $primaryKeyName = $this->getTablePrimaryKey($tableName);

    $qb->andWhere($primaryKeyName . ' = :' . $primaryKeyName);

    $qb->setParameter($primaryKeyName,$itemId);

    $rows = $qb->execute()->fetchAll();

    return count($rows) === 1 ? $this->extractItem($tableAlias . '__',$rows[0]) : null;
  }
915483
public function exclude($iElementID = null)
    {
        if (empty($iElementID) || $this->isEmpty()) {
            return $this->returnThis();
        }

        $iElementIDKey = array_search($iElementID, $this->arElementIDList);
        if ($iElementIDKey === false) {
            return $this->returnThis();
        }

        unset($this->arElementIDList[$iElementIDKey]);

        return $this->returnThis();
    }
59296
public function getEntity($className, $id)
    {
        if (isset($this->entities[$className]) && isset($this->entities[$className][$id])) {
            return $this->entities[$className][$id];
        }

        if (isset($this->stashedEntities[$className]) && isset($this->stashedEntities[$className][$id])) {
            return $this->stashedEntities[$className][$id];
        }

        return null;
    }
46256
public function element($eid)
    {
        $language = $this->requestStack->getCurrentRequest()->getLocale();

        if ($eid instanceof ContentTeaser) {
            $teaser = $eid;
            $eid = $teaser->getTypeId();
            $version = $teaser->getVersion();
        } elseif ($eid instanceof TreeNodeInterface) {
            $node = $eid;
            $eid = $node->getTypeId();
            $version = $node->getTree()->getVersion($node, $language);
        } elseif ($eid instanceof ContentTreeContext) {
            $node = $eid->getNode();
            $eid = $node->getTypeId();
            $version = $node->getTree()->getVersion($node, $language);
        } else {
            return null;
        }

        return $this->contentElementLoader->load($eid, $version, $language);
    }
733553
public function getItem($key, $itemId)
    {
        $dataset = $this->getDataset($key);

        foreach ($dataset as $item) {
            if ($item["id"] === $itemId) {
                return $item;
            }
        }
        return null;
    }
1368511
protected function _getCallableObject($sClassName, array $aOptions)
    {
        // Make sure the registered class exists
        if(key_exists('include', $aOptions))
        {
            require_once($aOptions['include']);
        }
        if(!class_exists($sClassName))
        {
            return null;
        }

        // Create the callable object
        $xCallableObject = new \Jaxon\Request\Support\CallableObject($sClassName);
        $this->aCallableOptions[$sClassName] = [];
        foreach($aOptions as $sName => $xValue)
        {
            if($sName == 'separator' || $sName == 'protected')
            {
                $xCallableObject->configure($sName, $xValue);
            }
            elseif(is_array($xValue) && $sName != 'include')
            {
                // These options are to be included in javascript code.
                $this->aCallableOptions[$sClassName][$sName] = $xValue;
            }
        }
        $this->aCallableObjects[$sClassName] = $xCallableObject;

        // Register the request factory for this callable object
        jaxon()->di()->set($sClassName . '_Factory_Rq', function () use ($sClassName) {
            $xCallableObject = $this->aCallableObjects[$sClassName];
            return new \Jaxon\Factory\Request\Portable($xCallableObject);
        });
        // Register the paginator factory for this callable object
        jaxon()->di()->set($sClassName . '_Factory_Pg', function () use ($sClassName) {
            $xCallableObject = $this->aCallableObjects[$sClassName];
            return new \Jaxon\Factory\Request\Paginator($xCallableObject);
        });

        return $xCallableObject;
    }
1162650
public static function WithElement( $schemaElement )
	{
		$result = new SequenceType();

		$result->TypeCode = XmlTypeCode::Element;
		$result->SchemaElement = $schemaElement;
		$result->IsNode = true;
		$result->ItemType = $result->TypeCodeToItemType( $result->TypeCode, $result->SchemaType );

		return $result;
	}
1242239
public function assignElementToSubShop($sElementTable, $sShopId, $sElementId)
    {
        /** @var BaseModel $oBase */
        $oBase = oxNew(\OxidEsales\Eshop\Core\Model\BaseModel::class);
        $oBase->init($sElementTable);
        if ($oBase->load($sElementId)) {
            /** @var \OxidEsales\Eshop\Core\Element2ShopRelations $oElement2ShopRelations */
            $oElement2ShopRelations = oxNew(\OxidEsales\Eshop\Core\Element2ShopRelations::class, $sElementTable);
            $oElement2ShopRelations->setShopIds($sShopId);
            $oElement2ShopRelations->addToShop($oBase->getId());
        }
    }
1049733
public function get($sClass)
    {
        if($this->sentryContainer != null && $this->sentryContainer->has($sClass))
        {
            return $this->sentryContainer->get($sClass);
        }
        return $this->coreContainer[$sClass];
    }
915242
public function getNearestPrev($iElementID, $iCount = 1, $bCyclic = false)
    {
        $obList = self::make();
        if (empty($iElementID) || empty($iCount) || $iCount < 1) {
            return $obList->returnThis();
        }

        //Check current collection
        if ($this->isEmpty() || !$this->has($iElementID)) {
            return $obList->returnThis();
        }

        $this->arElementIDList = array_values($this->arElementIDList);

        //Search element position
        $iElementPosition = array_search($iElementID, $this->arElementIDList);

        //Get prev elements
        $arResultIDList = array_slice($this->arElementIDList, 0, $iElementPosition);
        $arResultIDList = array_reverse($arResultIDList);

        if ($bCyclic && $iElementPosition < count($this->arElementIDList)) {
            //Get elements from end of array
            $arAdditionElementIDList = array_slice($this->arElementIDList, $iElementPosition);
            $arAdditionElementIDList = array_reverse($arAdditionElementIDList);

            $arResultIDList = array_merge($arResultIDList, $arAdditionElementIDList);
        }

        //Get result element ID list
        $arResultIDList = array_slice($arResultIDList, 0, $iCount);
        $obList->intersect($arResultIDList);

        return $obList->returnThis();
    }
914107
protected function NextItem()
	{
		// return null;
		$nodeTest = XmlQualifiedNameTest::Create();

		while ( true )
		{
			if ( ! $this->iterator->MoveNext() )
			{
				return null;
			}

			$node = $this->iterator->getCurrent();

			// An element with children cannot be an ID
			if ( $node->getHasChildren() ) continue;

			// Is this element a type?
			// $info = $node->getSchemaInfo();
			$type = $this->types->getElement( $node->LocalName, $node->Prefix == "" ? null : $node->Prefix );
			if ( $type )
			{
				return CoreFuncs::CloneInstance( $node );
			}
			else
			{
				// Look at the attributes
				if ( ! $node->getHasAttributes() ) continue;
				$attribs = AttributeNodeIterator::fromNodeTest( $this->context, $nodeTest, XPath2NodeIterator::Create( $node ) );
				foreach ( $attribs as $attribute )
				{
					$info = $attribute->getSchemaInfo();
					$type = $this->types->getAttribute( $attribute->LocalName, $info->Prefix == "" ? SCHEMA_PREFIX : $info->Prefix );
					if ( ! $type ) continue;
					foreach ( $type['types'] as $type )
					{
						if ( $type['prefix'] != SCHEMA_PREFIX ||
							 $type['name'] != ( $this->type ? "IDREF" : "ID" ) ||
							 ! in_array( $attribute->getValue(), $this->IDRef )
						) continue;
						return CoreFuncs::CloneInstance( $this->type ? $attribute : $node );
					}
					// if ( $attribute->LocalName == "anId" && in_array( $attribute->getValue(), $this->IDRef ) )
					// {
					// 	return CoreFuncs::CloneInstance( $node );
					// }
				}
			}
		}
	}