Instantiate a new entity based on the passed data This method is called from _create.

@param string $identifier The identifier of the entity to instantiate
@param array  $data       The raw data

@return AnDomainEntityAbstract
15316
protected function _instantiateEntity($identifier, $data)
    {
        $identifier = clone $identifier;
        $identifier->package = str_replace('com_', '', $data['option']);
        register_default(array(
            'identifier' => $identifier,
            'default' => array('ComComponentsDomainEntityComponent')
        ));

        return clone AnDomain::getRepository($identifier)->getClone();
    }
539381
public final function entity(array $data = []): Entity
    {
        $entity = new Entity($this, $data);
        if (method_exists($this, 'onEntity')) {
            $this->onEntity($entity);
        }

        return $entity;
    }
94644
public function retrieveById($identifier)
    {
        $model = $this->createModel();

        return $this->newModelQuery($model)
                    ->where($model->getAuthIdentifierName(), $identifier)
                    ->first();
    }
230200
public function getNodeByIdentifier($identifier)
    {
        $node = $this->firstLevelNodeCache->getByIdentifier($identifier);
        if ($node !== false) {
            return $node;
        }
        $nodeData = $this->nodeDataRepository->findOneByIdentifier($identifier, $this->getWorkspace(), $this->dimensions, $this->removedContentShown);
        if ($nodeData !== null) {
            $node = $this->nodeFactory->createFromNodeData($nodeData, $this);
        } else {
            $node = null;
        }
        $this->firstLevelNodeCache->setByIdentifier($identifier, $node);
        return $node;
    }
961722
public function loadSectionDataByIdentifier($identifier)
    {
        try {
            return $this->innerGateway->loadSectionDataByIdentifier($identifier);
        } catch (DBALException $e) {
            throw new RuntimeException('Database error', 0, $e);
        } catch (PDOException $e) {
            throw new RuntimeException('Database error', 0, $e);
        }
    }
1098257
private function setObject(array $data)
    {
        $identifierAttribute = $this->configuration->getIdentifierAttribute();

        if ($identifierAttribute === null) {
            throw new UndefinedIdentifierAttribute();
        }

        // We found an identifier attribute, $data is a json object
        if (isset($data[$identifierAttribute]) === true) {
            return $this->setObjectForObjectData($identifierAttribute, $data);
        }

        // We don't found an identifier attribute, $data is a collection
        return $this->setObjectForCollectionData($data);
    }
971380
public function update($identifier, array $attributes = [])
    {
        $instance = $identifier instanceof Eloquent
            ? $identifier
            : $this->repository->makeQuery()->findOrFail($identifier);

        $instance->fill($attributes);

        if ($instance->isDirty()) {
            $instance->save();
        }

        return $instance;
    }
121489
public static function fromData(array $data)
    {
        $class = get_called_class();
        $isDynamic = is_a($class, DynamicEntity::class, true);

        /** @var static $entity */
        $entity = (new \ReflectionClass($class))->newInstanceWithoutConstructor();

        object_set_properties($entity, $data, $isDynamic);

        if (method_exists($entity, '__construct')) {
            $entity->__construct();
        }

        $entity->markNew(false);

        return $entity;
    }
660697
public function set_method($identifier, $data, $ttl=0)
    {
    	$key = $this->_key($identifier);
    	$this->set($key, $data, $ttl);
    	return $data;
    }
182882
public static function setConfig($identifier, array $config)
    {
        $objIdentifier = self::getIdentifier($identifier);
        $strIdentifier = (string) $objIdentifier;

        if (isset(self::$_configs[$strIdentifier])) {
            self::$_configs[$strIdentifier] = self::$_configs[$strIdentifier]->append($config);
        } else {
            self::$_configs[$strIdentifier] = new AnConfig($config);
        }
    }
952176
public function addIdentifier(string $identifier)
    {
        $count = $this->queueRepository->countOpenByIdentifier($identifier);
        if ($count > 0) {
            return;
        }

        $this->logger->debug('SFC Queue add', [$identifier]);

        $data = [
            'cache_url' => $identifier,
            'page_uid' => 0,
            'invalid_date' => \time(),
            'call_result' => '',
        ];

        $this->queueRepository->insert($data);
    }
1291545
public function createClient($identifier)
    {
        if (!$this->converter_holder->hasType($identifier)) {
            throw new ConverterException(
                sprintf(
                    "No converter registered for type '%s'.",
                    $identifier
                )
            );
        }

        return new ConverterClient(
            $identifier,
            $this->converter_holder->getConverterForType($identifier)
        );
    }
991396
public function findModelByUniqueIdentifier($identifier)
    {
        $this->filter(new Equals($this->getModelSchema()->uniqueIdentifierColumnName, $identifier));

        return $this[0];
    }
1115295
public static function get($identifier = 'default')
    {
        if (!array_key_exists($identifier, self::$instances)) {
            self::$instances[$identifier] = static::create();
        }

        return self::$instances[$identifier];
    }
177681
public function create($product, $data, $storeView = null, $identifierType = null)
    {
        return $this->__createAction('catalogProductAttributeMediaCreate', func_get_args());
    }
351621
public function loadSectionDataByIdentifier($identifier)
    {
        $query = $this->dbHandler->createSelectQuery();
        $query->select(
            $this->dbHandler->quoteColumn('id'),
            $this->dbHandler->quoteColumn('identifier'),
            $this->dbHandler->quoteColumn('name')
        )->from(
            $this->dbHandler->quoteTable('ezsection')
        )->where(
            $query->expr->eq(
                $this->dbHandler->quoteColumn('identifier'),
                $query->bindValue($identifier, null, \PDO::PARAM_STR)
            )
        );

        $statement = $query->prepare();
        $statement->execute();

        return $statement->fetchAll(\PDO::FETCH_ASSOC);
    }
355366
protected function _configure(KObjectIdentifier $identifier, array $data = array())
    {
        //Prevent config settings from being stored in the identifier
        $config = clone $identifier->getConfig();

        //Append the config data from the singleton
        if($identifier->getType() != 'lib' && $this->isSingleton($identifier))
        {
            $parts = $identifier->toArray();

            unset($parts['type']);
            unset($parts['domain']);
            unset($parts['package']);

            //Append the config from the singleton
            $config->append($this->getIdentifier($parts)->getConfig());
        }

        //Append the config data for the object
        $config->append($data);

        //Set the service container and identifier
        $config->object_manager    = $this;
        $config->object_identifier = $identifier;

        return $config;
    }