/*!
Generates a unicode mapping table for idenfier \a $idenfier.

\param $identifier Is either a single identifier string or a
an array with identifiers.
\return The unicode mapping table for all defined identifiers
186618
function generateMappingCode( $identifier )
    {
        if ( !is_array( $identifier ) )
            $identifier = array( $identifier );
        $table = $this->expandInheritance( $identifier );

        // We allow all characters for now
        $allowedRanges = array();
        $simpleTable = $this->generateSimpleMappingTable( $table, $allowedRanges );
        ksort( $simpleTable );
        return $simpleTable;
    }
622950
protected function translateTokenFromIdentifier($identifier, $value)
    {
        $result = null;

        if (array_key_exists($identifier, self::$tokenValueMap)) {
            $result = $this->translateTokenUsingMap($identifier);
        } elseif (array_key_exists($identifier, self::$tokenCallbackMap)) {
            $result = $this->translateTokenUsingCallback($identifier, $value);
        }

        return $result;
    }
1205393
public static function escapeIdentifier($identifier = null) {
		$sqlAdapter = static::getSQLAdapter();
		return $sqlAdapter->escapeIdentifier($identifier ? $identifier : static::$table);
	}
962793
protected static function _parseIdentifier($identifier)
    {
        $parts = array();
        $hash  = $identifier;

        // Validate the variable format
        if (strpos($identifier, '.') !== false) {
            // Split the variable name into it's parts
            $parts = explode('.', $identifier);

            // Validate the hash name
            $hash   = array_shift($parts);
        }

        $hash = strtoupper($hash);

        return array($hash, $parts);
    }
697930
public function getForm($identifier, $instance) {
		$form = $this->jquery->semantic ()->dataForm ( $identifier, $instance );
		$form->setLibraryId ( "frmEdit" );
		$className = \get_class ( $instance );
		$fields = $this->controller->_getAdminData ()->getFormFieldNames ( $className, $instance );
		$relFields = OrmUtils::getFieldsInRelations_ ( $className );

		$this->setFormFields_ ( $fields, $relFields );
		array_unshift ( $fields, "_message" );
		$form->setFields ( $fields );

		$fieldTypes = OrmUtils::getFieldTypes ( $className );
		$this->setFormFieldsComponent ( $form, $fieldTypes );
		$this->relationMembersInForm ( $form, $instance, $className, $fields, $relFields );
		OrmUtils::setFieldToMemberNames ( $fields, $relFields );
		$form->setCaptions ( $this->getFormCaptions ( $fields, $className, $instance ) );
		$message = $this->getFormTitle ( $form, $instance );
		$form->setCaption ( "_message", $message ["subMessage"] );
		$form->fieldAsMessage ( "_message", [ "icon" => $message ["icon"] ] );
		$instance->_message = $message ["message"];
		$form->setSubmitParams ( $this->controller->_getBaseRoute () . "/update", "#frm-add-update" );
		$form->onGenerateField ( [ $this,'onGenerateFormField' ] );
		return $form;
	}
629435
protected function _findIdentity($identifier)
    {
        $fields = $this->getConfig('fields.' . self::CREDENTIAL_USERNAME);
        $conditions = [];
        foreach ((array)$fields as $field) {
            $conditions[$field] = $identifier;
        }

        return $this->getResolver()->find($conditions, ResolverInterface::TYPE_OR);
    }
508872
private function _key($identifier) {
    	extract($identifier);
    	$arg_string = "";
    	return md5(serialize($class . $method . implode('~', $args)));
    }
486125
public function findOneByIdentifier($identifier) {
		$statement = $this->connection->prepare('SELECT * FROM objects WHERE __identifier__ = :identifier LIMIT 1');
		$statement->bindValue(':identifier', $identifier);

		return $statement->execute()->fetchArray(SQLITE3_ASSOC);
	}
873112
protected function _parseIdentifier($identifier)
    {
        $parts = array();

        // Split the variable name into it's parts
        if(strpos($identifier, $this->_separator) !== false) {
            $parts = explode($this->_separator, $identifier);
        } else {
            $parts[] = $identifier;
        }

        return $parts;
    }
282887
public function quoteIdent($identifier)
	{
		if (\is_array($identifier))
		{
			return array_map([$this, __METHOD__], $identifier);
		}

		// Handle comma-separated identifiers
		if (strpos($identifier, ',') !== FALSE)
		{
			$parts = array_map('mb_trim', explode(',', $identifier));
			$parts = array_map([$this, __METHOD__], $parts);
			$identifier = implode(',', $parts);
		}

		// Split each identifier by the period
		$hiers = explode('.', $identifier);
		$hiers = array_map('mb_trim', $hiers);

		// Re-compile the string
		$raw = implode('.', array_map([$this, '_quote'], $hiers));

		// Fix functions
		$funcs = [];
		preg_match_all("#{$this->escapeCharOpen}([a-zA-Z0-9_]+(\((.*?)\))){$this->escapeCharClose}#iu", $raw, $funcs, PREG_SET_ORDER);
		foreach($funcs as $f)
		{
			// Unquote the function
			$raw = str_replace($f[0], $f[1], $raw);

			// Quote the inside identifiers
			$raw = str_replace($f[3], $this->quoteIdent($f[3]), $raw);
		}

		return $raw;
	}
114295
private function generateIdentifierName($identifier)
    {
        // Always generate name for unquoted identifiers to ensure consistency.
        $identifier = new Identifier($identifier);

        return strtoupper(dechex(crc32($identifier->getName())));
    }
1290264
public function get($identifier)
    {
        if (!isset($this->languages[$identifier])) {
            return null;
        }

        return $this->languages[$identifier];
    }
592411
public static function getComponentWithIdentifier(string $identifier)
    {
        $components = self::getComponents();
        foreach ($components as $component) {
            if (empty($component->getIdentifier())) {
                continue;
            }
            
            if ($component->getIdentifier() == $identifier) {
                return $component;
            }
        }
        
        return null;
    }
806841
public function get($identifier)
    {
        $identifier = (string) $identifier;

        if($this->offsetExists($identifier)) {
            $result = $this->offsetGet($identifier);
        } else {
            $result = null;
        }

        return $result;
    }
36650
public function findRegistriesEntityById($identifier, $id)
    {
        $sql = 'SELECT * FROM registry AS r WHERE (r.type = :identifier OR r.scope = :identifier) AND ((r.key = "identifier" AND r.value = :id) OR (r.scope = :id))';
        $query = $this->_em->createNativeQuery($sql, $this->getResultSetMapping());
        $query->setParameters(array('identifier' => $identifier,
            'id' => $id,
            )
        );

        return $query->getResult();
    }
572665
protected function _parseIdentifier($identifier)
    {
        $parts = array();

        // Split the variable name into it's parts
        if(strpos($identifier, '.') !== false) {
            $parts = explode('.', $identifier);
        } else {
            $parts[] = $identifier;
        }

        return $parts;
    }
485231
public function getByIdentifier(Identifier $identifier)
    {
        $className = $identifier->class->getName();
        $mapId     = $identifier->getSerialized();

        return $this->identityMap[$className][$mapId];
    }