Returns field's values

@param string $field_name    Field's name
@return array                Array with field's values
435590
public function getFieldValues(string $field_name)
    {
        try {
            $field = [];
            $result = $this->stmt->fetchAll(\PDO::FETCH_ASSOC);
            if (array_key_exists($field_name, $result[0])) {
                foreach ($result as $row) {
                    $field[] = $row[$field_name];
                }
            } else {
                throw new \Exception("Field '$field_name' is not present in the current result set.\n");
            }
            return $field;
        } catch (\PDOException $e) {
            die('Error: ' . $e->getMessage());
        } catch (\Exception $e) {
            die("Error: " . $e->getMessage());
        }
    }
497192
public function field($field_name, array $attributes = array())
    {
        if (isset($this->fields[$field_name])) {
            $field = $this->fields[$field_name];
            if (count($attributes)) {
                $field->attributes($attributes);
                $field->build();
            }

            return $field;
        }
    }
13931
private static function getFieldNameArray($fields)
    {
        if (count($fields) === 0) {
            return;
        }

        $names = array();

        foreach ($fields as &$field) {
            $names[] = $field->name;
        }

        return $names;
    }
302960
public function getGlobalParamGet(string $field_name, int $field_type) {
        try {
            $param = Get::getInstance()->getCleanedField($field_name, $field_type);
        } catch (\RuntimeException $e) {
            \trigger_error($e->getMessage());

            $param = null;
        }

        return $param;
    }
772153
public static function get_column_data( $column_name, $table ) {

		global $wpdb;

		$column_data = $wpdb->get_results( 'DESCRIBE ' . $table, ARRAY_A );

		foreach ( $column_data as $single_column ) {
			if ( $column_name === $single_column['Field'] ) {
				return $single_column;
			}
		}

		return $column_data;
	}
356683
def get_custom_value(self, field_name):
        
        custom_field = self.get_custom_field(field_name)
        return CustomFieldValue.objects.get_or_create(
            field=custom_field, object_id=self.id)[0].value
722967
public function getCleanedFieldAsBool(string $field_name): bool
    {
        // Special case, if we have key set but no value - we keep it as true, e.g. &status=active&order_desc = order_desc must be true
        if (isset($this->initial_data[$field_name]) && '' === $this->initial_data[$field_name]) {
            return $this->initial_data[$field_name] = true;
        }

        return parent::getCleanedFieldAsBool($field_name);
    }
208655
public function getNodeElements($field_name)
	{
		$node_elements = $this->findAll(
			'named',
			array('field', $this->getXpathEscaper()->escapeLiteral($field_name))
		);

		if ( empty($node_elements) ) {
			throw new FormException(
				sprintf('Form field "%s" not found', $field_name),
				FormException::TYPE_NOT_FOUND
			);
		}

		return $node_elements;
	}
978437
public function getFieldsByName( $name )
	{
		$name	= strtolower( $name );
		if( isset( $this->fields[$name] ) )
			return $this->fields[$name];
		return array();
	}
725570
def get_method_returning_field_value(self, field_name):
        
        return (
            super().get_method_returning_field_value(field_name)
            or self.core.get_method_returning_field_value(field_name)
        )
39753
public function list_fields()
	{
		$field_names = array();
		for ($i = 0, $c = $this->num_fields(); $i < $c; $i++)
		{
			$field_names[$i] = sqlite_field_name($this->result_id, $i);
		}

		return $field_names;
	}
879889
public function field_data()
	{
		$retval = array();

		for ($i = 0, $c = $this->num_fields(); $i < $c; $i++)
		{
			$retval[$i]			= new stdClass();
			$retval[$i]->name		= cubrid_field_name($this->result_id, $i);
			$retval[$i]->type		= cubrid_field_type($this->result_id, $i);
			$retval[$i]->max_length		= cubrid_field_len($this->result_id, $i);
			$retval[$i]->primary_key	= (int) (strpos(cubrid_field_flags($this->result_id, $i), 'primary_key') !== FALSE);
		}

		return $retval;
	}
82176
public function getFieldNames()
    {
        $names = array();

        foreach ($this->getFields() as $field) {
            $names[] = $field->name;
        }

        return $names;
    }
654272
public function getField($name)
    {
        $result = null;
        foreach ($this->fields as $key => $fields) {
            if (isset($fields[$name])) {
                $result = $fields[$name];
            }
        }
        return $result;
    }
804665
public function list_fields()
	{
		$field_names = array();
		for ($i = 0, $c = $this->num_fields(); $i < $c; $i++)
		{
			$field_names[] = pg_field_name($this->result_id, $i);
		}

		return $field_names;
	}
12100
function get_value($name){
		if (!array_key_exists($name,$this->data)){
			LogMaster::log("Incorrect field name used: ".$name);
			LogMaster::log("data",$this->data);
			return "";
		}
		return $this->data[$name];
	}
1371314
private function useShortGetterName($field_name)
    {
        return substr($field_name, 0, 3) === 'is_' || in_array(substr($field_name, 0, 4), ['has_', 'had_', 'was_']) || in_array(substr($field_name, 0, 5), ['were_', 'have_']);
    }