Return real table column from array key.

@param string $array_key

@return mixed
169285
public function getFieldFromArrayKey($array_key)
    {
        // get table column from array key
        $key_array = explode(' ', $array_key);
        // check no of chunk
        return (count($key_array) == '2') ? $key_array[0] : ((count($key_array) > 2) ? $key_array[1] : $key_array[0]);
    }
49969
public function arrayKeyValueFunc($key, $val, $current_array = null)
    {
        if (empty($current_array)) {
            return array($key => $val);
        }

        $current_array[$key] = $val;

        return $current_array;
    }
1172613
public static function getUniqueColumnElements(array $array, $elementKey = null)
    {
        if (is_null($elementKey)) {
            return array_unique($array);
        }

        $uniqueElements = [];
        foreach ($array as $key => $value) {
            if (is_array($value) && isset($value[$elementKey])) {
                $value = $value[$elementKey];
            } elseif (is_object($value) && property_exists($value, $elementKey)) {
                $value = $value->{$elementKey};
            } else {
                continue;
            }
            if (!in_array($value, $uniqueElements, true)) {
                $uniqueElements[] = $value;
            }
        }
        return $uniqueElements;
    }
183610
public function get($key)
    {
        try {
            $stmt = $this->getStatement(__METHOD__, self::GET_SQL);
            $stmt->execute(array($key));
        } catch (\PDOException $e) {
            return false;
        }
        $result = $stmt->fetchColumn();
        return empty($result) ? false : unserialize($result);
    }
358794
protected function getSortableClass($column_key)
    {
        $classes = NULL;

        if ($this->getColumnOption($column_key, self::COLUMN_OPTION_SORTABLE))
        {
            $classes .= 'sorting ';
            if (array_key_exists($column_key, $this->columnOrders))
            {
                $order_method = $this->columnOrders[$column_key];
                switch ($order_method)
                {
                    case 'desc':
                        $classes .= 'sorting_asc ';
                        break;
                    default:
                        $classes .= 'sorting_desc ';
                }
            }
        }

        return $classes;
    }
480789
public static function getColumn(array $array, $index)
	{
		$result = array();

		foreach ($array as $item)
		{
			if (is_array($item) && isset($item[$index]))
			{
				$result[] = $item[$index];
			}
			elseif (is_object($item) && isset($item->$index))
			{
				$result[] = $item->$index;
			}
		}

		return $result;
	}
165916
function getColumnValue($column_name)
    {
        return isset($this->last_row[$column_name]) ? $this->last_row[$column_name] : null;
    }
1297806
public static function get(array $array, $key, $default = null)
    {
        if (array_key_exists($key, $array)) {
            return $array[$key];
        }

        if (strpos($key, '.') === false) {
            return $default;
        }

        foreach (explode('.', $key) as $segment) {
            if (is_array($array) && array_key_exists($segment, $array)) {
                $array = $array[$segment];
            } else {
                return $default;
            }
        }

        return $array;
    }
953053
public static function get($array, $key, $default = null)
	{
		if (!static::accessible($array))
			return value($default);

		if (is_null($key))
			return $array;

		if (static::exists($array, $key))
			return $array[(string) $key];


		foreach (static::toKey($key) as $segment) {
			if (static::accessible($array) && static::exists($array, $segment)) {
				$array = $array[$segment];
			} else {
				return value($default);
			}
		}

		return $array;
	}
843493
public function column($field, $key = '')
    {
        $result = false;
        if (isset($this->options['field'])) {
            unset($this->options['field']);
        }
        if ($key && '*' != $field) {
            $field = $key . ',' . $field;
        }
        $cursor = $this->field($field)->fetchCursor(true)->select();
        $cursor->setTypeMap(['root' => 'array']);
        $resultSet = $cursor->toArray();
        if ($resultSet) {
            $fields = array_keys($resultSet[0]);
            $count  = count($fields);
            $key1   = array_shift($fields);
            $key2   = $fields ? array_shift($fields) : '';
            $key    = $key ?: $key1;
            foreach ($resultSet as $val) {
                $name = $val[$key];
                if ($name instanceof ObjectID) {
                    $name = $name->__toString();
                }
                if (2 == $count) {
                    $result[$name] = $val[$key2];
                } elseif (1 == $count) {
                    $result[$name] = $val[$key1];
                } else {
                    $result[$name] = $val;
                }
            }
        } else {
            $result = [];
        }
        return $result;
    }
977460
public function column($key)
    {
        $result = array_column($this->all(), $key);

        if (empty($result)) {
            $this->each(function ($item) use (&$result, $key) {
                array_push($result, $item->{$key});
            });
        }

        return new static($result);
    }
148935
public static function getColumn(&$array, $index)
	{
		$result = array();

		if (is_array($array))
		{
			$n = count($array);

			for ($i = 0; $i < $n; $i++)
			{
				$item = &$array[$i];

				if (is_array($item) && isset($item[$index]))
				{
					$result[] = $item[$index];
				}
				elseif (is_object($item) && isset($item->$index))
				{
					$result[] = $item->$index;
				}
				// else ignore the entry
			}
		}
		return $result;
	}
476151
public function get($p_key, $p_default = false)
    {
        return $this->getValue($p_key, $this->getAsArray(), $p_default);
    }
582686
public static function arrayGet(array $array, $key, $default = null)
    {
        if (isset($array[$key])) {
            return $array[$key];
        }

        foreach (explode('.', $key) as $segment) {
            if (!is_array($array) || !array_key_exists($segment, $array)) {
                return $default;
            }

            $array = $array[$segment];
        }

        return $array;
    }
303388
public function getItem($key)
	{
		$table = $this->getTableCache();

		if (array_key_exists($key, $table)) {
			return $table[$key];
		} else {
			return false;
		}
	}
1358684
public static function getObjectWithKey(array $array, $key)
    {
        foreach ($array as $object) {
            if (is_array($object) && array_key_exists($key, $object)) {
                return $object;
            }
        }

        return null;
    }
116100
public static function get(array $array, string $key = null, $default = null)
    {
        if ($key === null) {
            return $array;
        }

        if ($array === []) {
            return $default;
        }

        if (isset($array[$key])) {
            return $array[$key];
        }

        foreach (\explode('.', $key) as $segment) {
            if (\is_array($array) && isset($array[$segment])) {
                $array = $array[$segment];
            } else {
                return $default;
            }
        }

        return $array;
    }