获取字段错误

@param null $field
@return array|bool|mixed
15614
public function errors($field = null)
    {
        if ($field !== null) {
            return isset($this->_errors[$field]) ? $this->_errors[$field] : false;
        }

        return $this->_errors;
    }
991980
public function errored($field = null)
    {
        if (!func_num_args()) {
            return !!$this->_errors;
        }
        return isset($this->_errors[$field]);
    }
422040
public function clear(string $field = null): bool
    {
        Debug::setCache(static::$type, 'clear', 'FIELD', $field);

        // 如果未提供field参数,则清除全部缓存
        if (!$field) {
            return $this->clearAll();
        }

        // 取域缓存
        $keys = $this->get(self::PREFIX_FIELD . $field);
        if ($keys and $keys !== CacheFactory::NOT_FOUND) {

            // 逐个删除域中的所有项
            foreach ($keys as $key) {
                $this->delete($key);
            }

            // 删除域
            $this->delete('Field_' . $field);
        }

        return true;
    }
1068834
public function getUploadFieldName($field = null)
    {
        if (!is_null($field)) {
            return $field;
        }

        $imagesFields = $this->getDefinedUploadFields();
        $fieldKey = array_first(array_keys($imagesFields));

        // return first field name
        return is_int($fieldKey)
            ? $imagesFields[$fieldKey]
            : $fieldKey;
    }
378656
public function value($field, $default = null)
    {
        $result = null;
        if (!$result) {
            if (isset($this->options['field'])) {
                unset($this->options['field']);
            }
            $cursor = $this->field($field)->fetchCursor(true)->find();
            $cursor->setTypeMap(['root' => 'array']);
            $resultSet = $cursor->toArray();
            $data      = isset($resultSet[0]) ? $resultSet[0] : null;
            $result    = $data[$field];
        } else {
            // 清空查询条件
            $this->options = [];
        }
        return !is_null($result) ? $result : $default;
    }
708233
protected function _getAuthFieldsList($field = null) {
		$authGroups = $this->_modelConfigSettingsApp->getAuthGroups();
		$result = [];
		if (empty($field)) {
			return $result;
		}

		foreach ($authGroups as $userRole => $authInfo) {
			if (!isset($authInfo[$field]) || empty($authInfo[$field])) {
				continue;
			}

			$result[$userRole] = $authInfo[$field];
		}

		return $result;
	}
1077777
public function isValueChanged($field)
    {
        if (!$this->IsNullable($field)) {
            return false;
        }

        return isset($this->nullableChanged[$field]);
    }
389103
public function getOrderBy($field)
    {
        return array_key_exists($field, $this->orderBy) ?
                  $this->orderBy[$field]
                : null;
    }
1186060
public function scalar($field) {
		$result = $this->first();
		if (empty($result)) {
			return null;
		}
		return $result->$field;
	}
663813
private function getMapKeys(string $field): ?array
    {
        $keys = [];
        foreach ($this->data as $row) {
            if (array_key_exists($field, $row) and !in_array($row[$field], $keys) and !is_null($row[$field])) {
                $keys[] = $this->table->escape($row[$field]);
            }
        }

        // 如果本表关联字段无值,不处理
        if (!count($keys)) {
            return null;
        }

        return $keys;
    }
377756
public function map(Field $field)
    {
        if (!isset($field->value['latitude'], $field->value['longitude'])) {
            return null;
        }

        return [
            'lat' => $field->value['latitude'],
            'lon' => $field->value['longitude'],
        ];
    }
684982
public function getField(string $field)
    {
        if (isset($this->_record[$field]))
            return $this->_record[$field];
        return null;
    }
1215161
public function clear(string $field = null): bool
    {
        Debug::setCache(static::$type, 'clear', 'FIELD', $field);

        // 如果未提供field参数,则清除全部缓存
        if (!$field) {
            //查看有哪些FIELD
            $keys = Redis::listKeys(self::PREFIX . 'TABLE:*');

            //逐个FIELD删除
            foreach ($keys as $key) {
                $this->clear($key);
            }
            return true;
        }

        /**
         * 删除一个域
         * @var $list RedisList
         */
        $list = Redis::get(self::PREFIX . self::PREFIX_FIELD . $field);

        //获取一个域中的键
        $keys = [];
        if ($list) while ($key = $list->popLeft()) {
            $keys[] = self::PREFIX . $key;
        }


        //删除所有键,以及域
        $keys[] = self::PREFIX . self::PREFIX_FIELD . $field;
        Redis::delete($keys);
        return true;
    }
194016
public function getOne($field = null)
    {
        $row = $this->statement->fetch(PDO::FETCH_ASSOC);

        return null === $field ? $row : $row[$field];
    }
812167
public function fields( $field = null, $option = null ) {

		$field_data = null;

		if ( empty( $this->fields ) ) {
			// No fields found.
			$field_data = array();
		} elseif ( empty( $field ) ) {
			// Return all fields.
			$field_data = (array) $this->fields;
		} elseif ( ! isset( $this->fields[ $field ] ) && ! isset( $this->pod_data['object_fields'][ $field ] ) ) {
			// Field not found.
			$field_data = array();
		} elseif ( empty( $option ) ) {
			// Return all field data.
			if ( isset( $this->fields[ $field ] ) ) {
				$field_data = $this->fields[ $field ];
			} elseif ( isset( $this->pod_data['object_fields'] ) ) {
				$field_data = $this->pod_data['object_fields'][ $field ];
			}
		} else {
			$options = array();

			// Merge options.
			if ( isset( $this->fields[ $field ] ) ) {
				$options = array_merge( $this->fields[ $field ], $this->fields[ $field ]['options'] );
			} elseif ( isset( $this->pod_data['object_fields'] ) ) {
				$options = array_merge( $this->pod_data['object_fields'][ $field ], $this->pod_data['object_fields'][ $field ]['options'] );
			}

			if ( 'data' === $option && in_array( pods_v( 'type', $options ), PodsForm::tableless_field_types(), true ) ) {
				// Get a list of available items from a relationship field.
				$field_data = PodsForm::field_method( 'pick', 'get_field_data', $options );
			} elseif ( isset( $options[ $option ] ) ) {
				// Return option.
				$field_data = $options[ $option ];
			}
		}//end if

		/**
		 * Modify the field data before returning
		 *
		 * @since unknown
		 *
		 * @param array       $field_data The data for the field.
		 * @param string|null $field      The specific field that data is being return for, if set when method is called or null.
		 * @param string|null $option     Value of option param when method was called. Can be used to get a list of available items from a relationship field.
		 * @param Pods|object $this       The current Pods class instance.
		 */
		return apply_filters( 'pods_pods_fields', $field_data, $field, $option, $this );

	}
1074115
public function getCast($field)
    {
        if (isset($this->casts[$field])) {
            return $this->casts[$field];
        }

        return null;
    }
1078283
public function get($group, $field)
    {
        if (!$group = $this->group($group)) {
            return null;
        }

        return $group->{$field};
    }