Fetches a single value from a key chain of N depth
@return array|mixed
@throws KeyNotFoundException
434502
public function fetch(/* $key1, $key2, ... $keyN */)
    {
        $keys = func_get_args();

        $config = $this->config;
        foreach ($keys as $key) {
            if (isset($config[$key])) {
                $config = $config[$key];
            } else {
                throw new KeyNotFoundException("Key $key not found.");
            }
        }

        return $config;
    }
404226
protected function fetchKeys()
	{
		$keys=array();
		if($data=$this->getData())
		{
			if(is_object(reset($data)))
				foreach($data as $i=>$item)
					$keys[$i]=$item->{$this->keyField};
			else
				foreach($data as $i=>$item)
					$keys[$i]=$item[$this->keyField];
		}
		return $keys;
	}
430636
public function getKeys() {
        $keys = [];
        foreach($this->arrays as $array) {
            $keys = array_merge($keys, $array instanceof \ArrayAccess ? $array->getKeys():array_keys($array));
        }
        return array_unique($keys);
    }
580316
public function getValue()
    {
        $parts = $this->literalParts;
        
        reset($this->encodedParts);
        ksort($this->encodedParts);
        while (current($this->encodedParts) !== false) {
            $parts[key($this->encodedParts)] = $this->getNextEncodedValue();
        }
        
        ksort($parts);
        return array_reduce(
            $parts,
            function ($carry, $item) {
                return $carry . $item;
            },
            ''
        );
    }
467465
public function get($key) {
        $value = null;

        // If the key already exists in the attribute list, return it immediately
        if ($this->has($key)) {
            $value = $this->_attributes[$key];
        }

        // If the key being accessed points to a relation, either lazy load the data or return the cached data
        if (!$value && $this->hasRelation($key)) {
            $value = $this->getRelation($key)->fetchRelation();

            $this->set($key, $value);

        // If an accessor has been defined, run the value through the accessor before returning
        } else if ($method = $this->hasAccessor($key)) {
            $value = $this->{$method}($value);
        }

        return $value;
    }
428949
public function getIterator()
    {
        if ($this->offset > 0) {
            $key   = null;
            $index = 0;
            //Skip the first N
            while (false !== ($record = $this->statement->fetch())) {
                if ($key === $record[ $this->pkField ]) {
                    continue;
                }
                $key = $record[ $this->pkField ];
                if ($index++ === $this->offset) {
                    break;
                }
            }
            $current = $record;
        } else {
            $current = $this->statement->fetch();
        }

        $currentKey = $current[ $this->pkField ];

        $fetchedRecordCount = 1;
        do {
            yield $currentKey => $current;

            $current = $this->statement->fetch();
            if (empty($current)) {
                break;
            }
            if ($currentKey !== $current[ $this->pkField ]) {
                $currentKey = $current[ $this->pkField ];
                $fetchedRecordCount++;
            }
        } while ($fetchedRecordCount <= $this->limit);

        $this->statement->closeCursor();
    }
419377
public function toArray()
    {
        $raw = $this->dsn->toArray();
        $allKeys = array_unique(array_merge(static::$mandatoryKeys, array_keys($raw)));
        $return = [];

        foreach ($allKeys as $key) {
            if (isset($this->keyMap[$key])) {
                $key = $this->keyMap[$key];
                if (!$key) {
                    continue;
                }
            }

            $val = $this->$key;
            if ($val !== null) {
                $return[$key] = $val;
            }
        }

        return $return;
    }
692182
public function getArray($key = null) {
        if (!is_null($key)) {
            return $this->getDeepValue($key);
        } else {
            return $this->_data;
        }
    }
19861
public function extractKeys() {
    if (!$this->hasScalarKeys()) {
      throw new \DomainException('Cannot extract non-scalar keys from array lookup ' . $this);
    }
    return array_map(function(ScalarNode $key) { return $key->toValue(); }, $this->getKeys());
  }
1240476
public function getParent()
    {
        $depth = $this->iterator->getDepth();

        return $depth === 0
            ? $this->id
            : $this->iterator->getSubIterator($depth - 1)->key();
    }
652412
public function get($key, $valueDefault = null)
    {
        if (is_array($key)) {
            $values = [];
            foreach ($key as $key) {
                $values[$key] = array_key_exists($key, $_SESSION[$this->name])
                    ? $_SESSION[$this->name][$key] : $valueDefault;
            }
            return $values;
        }

        return array_key_exists($key, $_SESSION[$this->name])
            ? $_SESSION[$this->name][$key] : $valueDefault;
    }
10283
public function key()
	{
		$keys	= array_keys( $this->pairs );
		return $this->position < $this->count() ? $keys[$this->position] : NULL;
	}
1095144
public function getPrimaryKeyValue()
    {
        $primaryKey = $this->getPrimaryKey();
        if (isset($this->$primaryKey)) {
            return $this->$primaryKey;
        } else {
            return null;
        }
    }
745007
protected function getAnyKey(array $keys)
    {
        foreach($keys as $key)
        {
            $value = $this->getValue($key);

            if(!is_null($value))
            {
                return $value;
            }
        }
    }
219644
public function getKeyValue()
    {
        if (array_key_exists($this->primary_key, $this->original)) {
            return $this->original[$this->primary_key];
        }

        return null;
    }
213406
public function getValue()
    {
        $value = $this->getRawValue();
        if (is_array($value)) {
            foreach ($value as $key => $part) {
                $value[$key] = $this->getFilterChain()
                    ->filter($part);
            }
            return $value;
        }
        return $this->getFilterChain()
            ->filter($value);
    }
916098
final private function getSqlKeyValues() {
		
		// force to array
		$propertyNames = (array)$this->keyProperties;

		// list to return
		$values = array();

		foreach ($propertyNames as $name) {
			$values[] = $this->{$name};
		}

		return $values;

	}