Pobiera sumę z kolumny
@param string $keyName nazwa klucza
@return string wartość minimalna
329275
public final function findSum($keyName)
    {
        //odpytanie adaptera o rekord
        $result = DbConnector::getAdapter()->select('SUM(' . DbConnector::getAdapter()->prepareField($keyName) . ')', $this->_prepareFrom(), $this->_query->getQueryCompile()->where, $this->_query->getQueryCompile()->groupBy, $this->_query->getQueryCompile()->order, 1, null, $this->_query->getQueryCompile()->bind);
        return isset($result[0]) ? current($result[0]) : null;
    }
356428
public static final function getTableStructure($tableName)
    {
        //pobranie struktury z obiektu (wcześniej zapisane)
        if (isset(self::$_tableStructure[$tableName])) {
            return self::$_tableStructure[$tableName];
        }
        //pobranie z cache
        $cacheKey = 'mmi-orm-structure-' . self::getAdapter()->getConfig()->name . '-' . $tableName;
        if (static::$_cache !== null && (null !== ($structure = static::$_cache->load($cacheKey)))) {
            return $structure;
        }
        //pobranie z adaptera
        $structure = static::getAdapter()->tableInfo($tableName);
        //zapis do bufora
        if (static::$_cache !== null) {
            static::$_cache->save($structure, $cacheKey, 0);
        }
        //zwrot i zapis do tablicy zapisanych struktur
        return self::$_tableStructure[$tableName] = $structure;
    }
55205
public function load($keyName)
    {
        $file = $this->buildFilePath($keyName);

        $keyValue = file_get_contents($file);

        if ($keyValue === false) {
            throw new VirgilException('Could not read key.');
        }

        $keyValueData = json_decode($keyValue, true);

        return new KeyEntry($keyName, $keyValueData['value'], $keyValueData['meta']);
    }
524360
private function _scalarValueByAttribute(\Cms\Orm\CmsAttributeRecord $attribute)
    {
        //iteracja po wartościach
        foreach ($this->_cmsAttributeValues as $valueRecord) {
            //znaleziony atrybut
            if ($valueRecord->cmsAttributeId == $attribute->id) {
                //zwrot wartości
                return $valueRecord->value;
            }
        }
        return $attribute->getJoined('cms_attribute_value')->value;
    }
476477
public function _($key, array $params = [])
    {
        //jeśli brak locale - zwrot klucza
        if (null === $this->_locale) {
            return $key;
        }
        //parametry istnieją
        if (!empty($params)) {
            $filteredParams = [];
            array_walk($params, function ($value, $key) use (&$filteredParams) {
                $filteredParams['%' . $key . '%'] = $value;
            });
            $params = $filteredParams;
        }
        //zwrot znalezionego tłumaczenia
        if (isset($this->_data[$this->_locale][$key])) {
            return strtr($this->_data[$this->_locale][$key], $params);
        }
        //logowanie braku tłumaczenia i zwrot klucza
        return $this->_returnKeyAndLogUntranslated($key, $params);
    }
413735
protected static function getSpecificDynamoDbKey(DynamoDbModel $model, $keyName, $value)
    {
        $idKey = $model->marshalItem([
            $keyName => $value,
        ]);

        return [$keyName => $idKey[$keyName]];
    }
837610
public function getNameByKey($key)
    {
        return (array_key_exists($key, $this->_languages)) ? $this->_languages[$key] : null;
    }
90255
protected function serverValue(string $keyName): string
    {
        $calledClass = get_called_class(); //Autorize extends this class
        
        try {
            return $calledClass::getServerValue($keyName);
        } catch (\Exception $e) {
            return '';
        }
    }
974002
public static function getStorageKey($className)
    {
        $key = $className;

        if (!\OxidEsales\Eshop\Core\NamespaceInformationProvider::isNamespacedClass($className)) {
            $bcMap = self::getBackwardsCompatibilityClassMap();
            $key = isset($bcMap[strtolower($key)]) ? $bcMap[strtolower($key)] : strtolower($key);
        }

        return $key;
    }
355684
private function _getAttributesByKeyName($keyName="Name")
    {
        $attributes = array();

        $entries = $this->_queryAssertion('/saml:AttributeStatement/saml:Attribute');

        /** @var $entry DOMNode */
        foreach ($entries as $entry) {
            $attributeKeyNode = $entry->attributes->getNamedItem($keyName);

            if ($attributeKeyNode === null) {
                continue;
            }

            $attributeKeyName = $attributeKeyNode->nodeValue;

            if (in_array($attributeKeyName, array_keys($attributes))) {
                throw new OneLogin_Saml2_ValidationError(
                    "Found an Attribute element with duplicated ".$keyName,
                    OneLogin_Saml2_ValidationError::DUPLICATED_ATTRIBUTE_NAME_FOUND
                );
            }

            $attributeValues = array();
            foreach ($entry->childNodes as $childNode) {
                $tagName = ($childNode->prefix ? $childNode->prefix.':' : '') . 'AttributeValue';
                if ($childNode->nodeType == XML_ELEMENT_NODE && $childNode->tagName === $tagName) {
                    $attributeValues[] = $childNode->nodeValue;
                }
            }

            $attributes[$attributeKeyName] = $attributeValues;
        }
        return $attributes;
    }
996709
protected final function _keyShouldBeDeleted($key)
    {
        //brak informacji o usunięciu klucza
        if (null === $remoteTime = $this->_distributedStorage->getOption($key)) {
            return false;
        }
        //jeśli czas lokalnego usunięcia jest wyższy niż zdalnego, nie wolno usuwać
        if ($this->_undistributedCache->load($cacheKey = self::DEL_PREFIX . $key) >= $remoteTime) {
            return false;
        }
        //zapis lokalnie informacji o czasie usunięcia
        $this->_undistributedCache->save(time(), $cacheKey, 0);
        return true;
    }
163097
public function propertyValue(&$value, $keyName = null) {
$values = array();

if ($keyName !== null) $this->env->currentProperty = $keyName;

$s = null;
while ($this->expressionList($v)) {
$values[] = $v;
$s = $this->seek();
if (!$this->literal(',')) break;
}

if ($s) $this->seek($s);

if ($keyName !== null) unset($this->env->currentProperty);

if (count($values) == 0) return false;

$value = \ATPCore\Lessc::compressList($values, ', ');
return true;
}
51323
public function findKeyInArray($keyname) {
        foreach ($this->keys as $i => $key) {
            if ($keyname == $key->getName()) {
                return $i;
            }
        }
        return null;
    }
1022880
public final function findUnique($keyName)
    {
        //inicjalizacja pustej tabeli
        $result = [];
        //iteracja po danych
        foreach (DbConnector::getAdapter()->select('DISTINCT(' . DbConnector::getAdapter()->prepareField($keyName) . ')', $this->_prepareFrom(), $this->_query->getQueryCompile()->where, $this->_query->getQueryCompile()->groupBy, $this->_query->getQueryCompile()->order, null, null, $this->_query->getQueryCompile()->bind) as $row) {
            //dodawanie kolumny
            $result[] = current($row);
        }
        return $result;
    }
417013
public static function getCountryCode($countryName)
    {
        foreach (self::$countries as $key => $value) {
            if (!strcasecmp($value, $countryName)) {
                return $key;
            }
        }
        return '';
    }
658968
public function getToolkitServiceParam($optionName)
    {
        // special case, case sensitivity
        if ($optionName == 'InternalKey') {
            $optionName = 'internalKey';
        }

        // we use array_key_exists() rather than isset() because the value may be null.
        if (array_key_exists($optionName, $this->_options)) {
            return $this->_options[$optionName];
        } else {
            // nothing matched
            Throw new \Exception("Invalid option requested: $optionName");
        }
    }
91476
public function getPrimaryKey($tableName)
    {
        $indexes = $this->query("EXEC sp_helpindex '$tableName';");
        $indexName = '';
        foreach ($indexes as $index) {
            if ($index['index_keys'] == 'ID') {
                $indexName = $index['index_name'];
                break;
            }
        }

        return $indexName;
    }