Configure an identifier

@param KObjectIdentifier $identifier
@param array             $data
@return KObjectConfig
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;
    }
117907
public function findByIdentifier($identifier) {
    foreach ($this->packages as $package) {
      if (S::startsWith($package->getIdentifier(), $identifier)) {
        return $package;
      }
    }
  }
401783
protected function createCache(string $identifier): void
    {
        $frontend = isset($this->cacheConfigurations[$identifier]['frontend']) ? $this->cacheConfigurations[$identifier]['frontend'] : $this->cacheConfigurations['Default']['frontend'];
        $backend = isset($this->cacheConfigurations[$identifier]['backend']) ? $this->cacheConfigurations[$identifier]['backend'] : $this->cacheConfigurations['Default']['backend'];
        $backendOptions = isset($this->cacheConfigurations[$identifier]['backendOptions']) ? $this->cacheConfigurations[$identifier]['backendOptions'] : $this->cacheConfigurations['Default']['backendOptions'];
        $persistent = isset($this->cacheConfigurations[$identifier]['persistent']) ? $this->cacheConfigurations[$identifier]['persistent'] : $this->cacheConfigurations['Default']['persistent'];
        $cache = $this->cacheFactory->create($identifier, $frontend, $backend, $backendOptions, $persistent);
        $this->registerCache($cache, $persistent);
    }
595236
protected function _mixin(KObjectIdentifier $identifier, $mixer)
    {
        if ($mixer instanceof KObjectMixable)
        {
            $mixins = $identifier->getMixins();

            foreach ($mixins as $key => $value)
            {
                if (is_numeric($key)) {
                    $mixer->mixin($value);
                } else {
                    $mixer->mixin($key, $value);
                }
            }
        }

        return $mixer;
    }
747919
protected function updateByIdentifier($identifier, $data)
	{
		return $this->aggregate[IdentifierServiceProvider::getProviderKey()]->update($identifier->getEntity(), $data);
	}
552903
public static function set_config($identifier, HTMLEditorConfig $config = null)
    {
        if ($config) {
            self::$configs[$identifier] = $config;
            self::$configs[$identifier]->setOption('editorIdentifier', $identifier);
        } else {
            unset(self::$configs[$identifier]);
        }
        return $config;
    }
877777
protected static function setIdentifier($field, $identifier, $defaultIdentifier)
    {
        if ($identifier === null) {
            $identifier = new $defaultIdentifier();
        }

        if (!($identifier instanceof Identifier)) {
            throw new \InvalidArgumentException('$identifier must be instance of Identifier');
        }

        static::${$field} = $identifier;
    }
530770
public function remove($identifier)
    {
        $keys = $this->_parseIdentifier($identifier);

        foreach($keys as $key)
        {
            if(array_key_exists($key, $this->_data))
            {
                unset($this->_data[$key]);
                break;
            };
        }

        return $this;
    }
502770
public function setClass($identifier, $class)
    {
        $class      = trim($class);
        $identifier = (string) $identifier;

        $this->_classes[$identifier] = $class;

        return $this;
    }
521970
public function setIdentifier(array $identifier)
    {
        $this->identifier = $identifier;
        $this->isIdentifierComposite = (count($this->identifier) > 1);
    }
644351
protected function _locate(KObjectIdentifier $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($class !== false)
        {
            //Set loader basepath if we are locating inside an application
            if($this->isRegistered('object.bootstrapper'))
            {
                if($path = $this->getObject('object.bootstrapper')->getApplicationPath($identifier->domain)) {
                    $this->getClassLoader()->setBasePath($path);
                }
            }

            if(empty($class))
            {
                $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 KObjectInterface) {
                        $this->__registry->setClass($identifier, $class);
                    }
                }
            }
        }

        return $class;
    }
1091420
private function setObjectForObjectData(string $identifierAttribute, array $data)
    {
        $configurationObject = $this->configuration
            ->getConfigurationObjectForIdentifier($data[$identifierAttribute]);
        $className = $configurationObject->getClassName();
        $fqdnClass = $className->getValue();
        $object = new $fqdnClass();

        foreach ($data as $attribute => $value) {
            if ($attribute === $identifierAttribute) {
                continue;
            }

            $type = $configurationObject->getTypeForAttribute($attribute);
            $this->processDeserializeForType($type, $object, $value);
        }

        return $object;
    }
437165
public function store($identifier, $data)
    {
        if(!$data instanceof KUserInterface) {
            $data = $this->create($data);
        }

        $this->_users[$identifier] = $data;

        return $data;
    }
435430
public function withIdentifier(bool $identifier): self
    {
        $metadata = clone $this;
        $metadata->identifier = $identifier;

        return $metadata;
    }
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);
    }
394872
public function setIdentifier(Identifier $identifier)
    {
        if ($this->identifier !== null) {
            //TODO: throw exception
        }

        $this->identifier = $identifier;

        return $this;
    }
660697
public function set_method($identifier, $data, $ttl=0)
    {
    	$key = $this->_key($identifier);
    	$this->set($key, $data, $ttl);
    	return $data;
    }