Extract the value submitted from the provided dictionary
@param Dictionary $dict Where to get the value from

@return mixed The value from the dictionary, null if it doesn't exist
355450
public function extractValue(Dictionary $dict)
    {
        $parts = $this->name_parts;

        $value = null;
        $depth = 1;
        while (count($parts) > 1)
        {
            $key = array_shift($parts);
            if (!$dict->has($key, Type::ARRAY))
                return null;

            $dict = $dict->get($key);
            ++$depth;
        }

        $key = array_shift($parts);
        $value = $dict->get($key);
        
        // No values submitted
        if (null === $value || ($value instanceof \Countable && count($value) === 0))
            return null;

        if ($depth < $this->name_depth)
        {
            // Depth is one less than the amount of array levels,
            // because the last one was without a key. This
            // means that $value should not be a shallow array
            // containing no sub-arrays.
            if (!$value instanceof Dictionary || !$value->isShallow())
                return null;
        }

        // Result matches expected depth
        return $value;
    }
226473
def get_from_dicts(dict1, key, default_value, dict2, extra=''):
    

    value=default_value

    if key not in dict1:
       if dict2!=None:
          value=dict2.get(extra+key, default_value)
    else:
       value=dict1[key]
       del(dict1[key])

       if dict2!=None:
          dict2[extra+key]=value

    return value
1110283
public function extract($object)
    {
        $data = parent::extract($object);

        foreach ($this->getFreeValuesKeys() as $key) {
            $data[$key] = $object->get($key);
        }

        return $data;
    }
900953
def get_value(self, dictionary):
        
        # We override the default field access in order to support
        # lists in HTML forms.
        if html.is_html_input(dictionary):
            return html.parse_html_list(dictionary, prefix=self.field_name)
        return dictionary.get(self.field_name, empty)
940468
public function get($key)
    {
        $entry = $this->redis->hGet($this->cacheKey, $key);

        if ($entry) {
            $entry = unserialize($entry);

            if ($entry['expire']) {
                // Check expires
                $now = new \DateTime('now', new \DateTimeZone('UTC'));
                if ((int) $now->format('U') > $entry['expire']) {
                    $this->remove($key);

                    return null;
                }
            }

            return $entry['value'];
        }

        return null;
    }
1063961
public function value($key) {
        if (!isset($_COOKIE[$key])) {
            return null;
        }
        if ($this->hashed) {
            list($value, $hash) = unserialize($_COOKIE[$key]);
            if ($hash != hash('sha256', $value . $this->salt)) {
                return null;
            }
        } else {
            $value = $_COOKIE[$key];
        }
        return unserialize($value);
    }
760842
private function find($locale, $dictionary, $keys)
    {
        if (!isset($this->entries[$locale][$dictionary])) {
            if (!isset($this->entries[$locale])) {
                $this->entries[$locale] = [];
            }
            $file = $this->dictionaryFile($dictionary, $locale);
            /** @noinspection PhpIncludeInspection */
            $this->entries[$locale][$dictionary] = $file !== null && file_exists($file) ? include $file : [];
        }

        $entries = $this->entries[$locale][$dictionary];
        foreach ($keys as $key) {
            if (!isset($entries[$key])) {
                return null;
            }
            $entries = $entries[$key];
        }

        return $entries;
    }
220930
public function remove($key) {
        if (isset($this->data[$key])) {
            $value = $this->data[$key];
            unset($this->data[$key]);
            return $value;
        } else {
            return null;
        }
    }
250960
public function getKeyValue($key)
    {
        return empty($this->_data[$key]) ? null: $this->_data[$key];
    }
713835
public function getValue($key)
    {
        if (!isset($this->values[$key])) {
            return null;
        }
        return $this->values[$key];
    }
476434
public function value($key)
    {
        if (isset($this->data[$key])) {
            return $this->data[$key];
        }

        return null;
    }
153702
private function prepareKeyValue(array $dictionary, $command)
    {
        $keys = array_values(array_filter($dictionary, function ($key) {
            return $key % 2 == 0;
        }, ARRAY_FILTER_USE_KEY));
        $values = array_values(array_filter($dictionary, function ($key) {
            return $key % 2 == 1;
        }, ARRAY_FILTER_USE_KEY));

        if (count($keys) != count($values)) {
            throw new RedisProxyException("Wrong number of arguments for $command command");
        }
        return array_combine($keys, $values);
    }
1207612
public function find($key, $value)
    {
        foreach ($this->items as $item) {
            if ($this->extractValue($item, $key) == $value) {
                return $item;
            }
        }
        return null;
    }
393527
public static function extractValues($item, $key)
    {
        // Array of results
        $results = array();

        // Cast as array if object
        $item = is_object($item) ? (array) $item : $item;

        // Array of keys
        $keys = strstr($key, static::$key_split) ? explode(static::$key_split, $key) : array($key);
        $keys = array_filter($keys);

        // Key count
        $key_count = count($keys);

        // key count > 0
        if ($key_count > 0) {

                $curr_key = array_shift($keys);
                $arrayValues = array_values($item);
                $child = is_array($item) ? array_shift($arrayValues) : null;

                // it's an array
                if (is_array($item)) {
                    // Clean non-ASCII keys
                    foreach ($item as $k => $v) {
                        $sanitized = preg_replace('/[^(\x20-\x7F)]*/','', $k);
                        if ($sanitized !== $k) {
                            $item[$sanitized] = $v;
                            unset($item[$k]);
                        }
                    }

                    // it has the keys
                    if (array_key_exists($curr_key, $item)) {
                        $results = array_merge($results, static::extractValues($item[$curr_key], implode(static::$key_split, $keys)));
                    // else it's child has the key
                    } elseif ((is_array($child) || is_object($child))) {
                        if (array_key_exists($curr_key, $child)) {
                            foreach ($item as $child) {
                                $results = array_merge($results, static::extractValues($child, $key));
                            }
                        }
                    }
                }

        // no key
        } else {
            $results[] = $item;
        }
        return $results;
    }
1208400
public function getValue($key)
    {
        return array_key_exists($key, $this->data)
            ? $this->data[$key]
            : null;
    }
1050692
public function getValue($key) {
		if (isset ( $this->a [$key] )) {
			return $this->a [$key];
		} else {
			return NULL;
		}
	}
388722
public function pull($key)
    {
        $value = $this->get($key);
        $this->remove($key);

        return $value;
    }