@param string $field

@return int
332934
public function count($field = '*')
    {
        $copy = clone $this;

        $copy->_limit = null;
        $copy->_offset = null;
        $copy->_order = null;
        $copy->_aggregate['count'] = ['$sum' => 1];
        $r = $copy->execute();

        return $r ? $r[0]['count'] : 0;
    }
639435
public function getField($field)
    {
        if (isset($this->allFields[$field])) {
            return $this->allFields[$field];
        }

        return null;
    }
242666
public function count($field = '')
    {
        if ($field === '') {
            $query = [];
        } else {
            $query = (array) $field;
        }
        return count($this->select($query));
    }
1150442
protected function getAddressFieldValue($field)
    {
        if ($field instanceof \Closure) {
            return call_user_func($field, $this);
        }

        if (is_array($field)) {
            return $this->getRelationalField($field);
        }

        return $this->{$field};
    }
662809
public function type($field)
    {
        if (!is_array($this->_context['schema'])) {
            return null;
        }

        $schema = Hash::get($this->_context['schema'], $field);
        if ($schema === null) {
            $schema = Hash::get($this->_context['schema'], $this->stripNesting($field));
        }

        return isset($schema['type']) ? $schema['type'] : null;
    }
182231
public function max($field)
    {
        $r = null;
        foreach ($this->queries as $query) {
            $r = $r === null ? $query->max($field) : max($r, $query->max($field));
        }

        return $r;
    }
420231
private function getFieldData($field)
    {
        if (!isset($this->_fieldData[$field])) {
            foreach ($this->fields as $f) {
                if (($f['key'] === $field) || ($f['name'] === $field)) {
                    $this->_fieldData[$field] = $f;
                    break;
                }
            }
        }

        if (isset($this->_fieldData[$field])) {
            return $this->_fieldData[$field];
        } else {
            throw new Exception("Field $field does not exist");
        }
    }
394272
public function getFieldType($field) {
    try {
      $key = $this->getKey($field);
      
      // dies kann auch einen verschachtelten Array von Types zurück geben, wenn der Schlüssel den man angibt noch Untertypen hat
      return $this->types->get($key, DataInput::THROW_EXCEPTION, DataInput::THROW_EXCEPTION);
    
    } catch (\Psc\DataInputException $e) {
      $e = new FieldNotDefinedException(sprintf("Feld mit den Schluessel(n) '%s' ist nicht in Meta definiert. Vorhanden sind (Ebenen durch . getrennt): %s",
                                                $key, implode(', ', $avFields = $this->getKeys())),
                                        0, $e);
      $e->field = explode(':',$key); // expand
      $e->avaibleFields = $avFields;
      throw $e;
    }
  }
1266819
protected function getField($field)
    {
        foreach ($this->getFields() as $annotatedField) {
            if ($annotatedField->name === $field) {
                return $annotatedField;
            }
        }

        return null;
    }
1372156
public function fieldPosition($field)
    {
        if ($field instanceof FormField) {
            $field = $field->getName();
        }

        $i = 0;
        foreach ($this->dataFields() as $child) {
            if ($child->getName() == $field) {
                return $i;
            }
            $i++;
        }

        return false;
    }
684982
public function getField(string $field)
    {
        if (isset($this->_record[$field]))
            return $this->_record[$field];
        return null;
    }
1339932
public function getField(string $field) : string
        {
                $value = $this->_redis->hget($this->_key, $field);
                return empty($value) ? '' : strval($value);
        }
515537
public function increment(string $field, int $num) : int
        {
                return intval($this->_redis->hincrby($this->_key, $field, $num));
        }
429153
public function getField($field)
    {
        return isset($this->data[$field])
            ? $this->data[$field]
            : $this->searchField($field);
    }
1313927
public function write(array $fields): int
    {
        $options = $this->getCsvControl();
        $delimiter = $options[0];
        $enclosure = $options[1];
        if (!empty($enclosure)) {
            return $this->fputcsv($fields, $delimiter, $enclosure);
        }

        $fields = array_map(function ($field) use ($delimiter) {
            return str_replace([$delimiter, PHP_EOL], ['', ''], $field);
        }, $fields);

        return $this->fwrite(implode($delimiter, $fields) . PHP_EOL);
    }
1135244
protected function getNestedValue($field)
	{
		$field = preg_split('(__([0-9]+)__)', substr($field, 11), -1, PREG_SPLIT_DELIM_CAPTURE);

		if (!isset($this->data[$field[0]])) {
			return null;
		}

		$data =& $this->data[$field[0]];

		for ($i = 0; isset($field[$i]); $i += 2) {

			if (isset($field[$i + 1])) {
				if (!isset($data[$field[$i + 1]])) {
					return null;
				}
				if (!isset($data[$field[$i + 1]][$field[$i + 2]])) {
					return null;
				}
				$data =& $data[$field[$i + 1]][$field[$i + 2]];
			}
			else {
				return $data;
			}

		}
	}
579696
public function getInvalidField($field)
    {
        $value = isset($this->_invalid[$field]) ? $this->_invalid[$field] : null;

        return $value;
    }