Generic getter for properties belonging to this instance
<b>outside</b> the subclasses
like name, visible etc.

@param string $field property name
@return array|string|int|boolean value of the field
188400
public final function get($field) {
        // This is a legacy change to the way files are get/set.
        // We now only set $this->file to the id of the \stored_file. So, we need to convert that id back to a \stored_file here.
        if ($field === 'file') {
            return $this->get_file();
        }
        if (property_exists($this, $field)) {
            return $this->{$field};
        }
        $a = (object)array('property' => $field, 'class' => get_class($this));
        throw new portfolio_export_exception($this->get('exporter'), 'invalidproperty', 'portfolio', null, $a);
    }
1300626
public function get($field, $default = null)
	{
		// if it's an object property, return it, else return the default
		return isset($this->user->{$field}) ? $this->user->{$field} : $default;
	}
197360
protected function getFieldValue(array $attr, $field)
    {
        $method = 'set' . ucwords($field);

        if (method_exists($this, $method)) {
            // If there is a setter for this field, use that
            return $this->{$method}($attr[$field]);
        }

        // Otherwise just set the property
        return (isset($attr[$field])) ? $attr[$field] : null;
    }
46846
protected function get_field($field) {
        $fieldname = calculator::using_attempts_string_id($this->whichattempts).$field;
        return $this->{$fieldname};
    }
879080
public function findValue($field) {
        $row = $this->select($field)->findOne();

        //false or null
        if (!$row) {
            return $row;
        }

        return $row[$field];
    }
967736
protected function getName($field)
    {
        if (is_array($this->name)) {
            return isset($this->name[$field]) ? $this->name[$field] : $field;
        }

        return $this->name ?: $field;
    }
620711
public function getNewValue(string $field)
    {
        $change = $this->objectChangeSet->getFieldChange($field);

        if ($change !== null) {
            return $change->getNewValue();
        }
    }
1046739
protected function &getNestedValueReference($field)
	{
		$field = preg_split('(__([0-9]+)__)', substr($field, 11), -1, PREG_SPLIT_DELIM_CAPTURE);

		if (!isset($this->saveData[$field[0]])) {
			$this->saveData[$field[0]] = array();
		}

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

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

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

		}
	}
170244
private function getValues(array $field)
    {
        if ($field['type'] !== 'select') {
            return null;
        }
        $field = Bag::from($field);

        // Get the appropriate values
        return is_string($field->get('values', [])) ? $this->getEntityValues($field) : $this->getYamlValues($field);
    }
50461
public function getFieldDefinition($field)
    {
        if (isset($this->definition[$field])) {
            return $this->definition[$field];
        }
        if (isset($this->definition['fields'][$field])) {
            return $this->definition['fields'][$field];
        }
        return null;
    }
435232
public function getField($field)
    {
        // Skip invalid fields
        $fields = $this->compositeDatabaseFields();
        if (!isset($fields[$field])) {
            return null;
        }

        // Check bound object
        if ($this->record instanceof DataObject) {
            $key = $this->getName() . $field;
            return $this->record->getField($key);
        }

        // Check local record
        if (isset($this->record[$field])) {
            return $this->record[$field];
        }
        return null;
    }
486851
public function get_field_raw( $field ) {
		if ( array_key_exists( $field, $this->prop( 'fields' ) ) ) {
			return $this->prop( 'fields' )[ $field ];
		}

		return null;
	}
171329
public function callGetter($field) {
    $f = 'get'.ucfirst($field);
    if (!method_exists($this, $f)) throw new \InvalidArgumentException($f.'() existiert nicht in '.\Psc\Code\Code::getClass($this));
    return $this->$f();
  }
1141550
protected function getItem($field)
    {
        $property = $field['field'];

        // If the field is an array,
        // make it an array in the Migration
        if (is_array($property)) {
            $property = "['". implode("','", $property) ."']";
        } else {
            $property = $property ? "'$property'" : null;
        }

        $type = $field['type'];

        $output = sprintf(
            "\$table->%s(%s)",
            $type,
            $property
        );

        // If we have args, then it needs
        // to be formatted a bit differently
        if (isset($field['args'])) {
            $output = sprintf(
                "\$table->%s(%s, %s)",
                $type,
                $property,
                $field['args']
            );
        }
        if (isset($field['decorators'])) {
            $output .= $this->addDecorators($field['decorators']);
        }
        return $output . ';';
    }
496094
public function analyseField($field)
    {
        try {
            $accessor = PropertyAccess::createPropertyAccessor();

            $data = $accessor->getValue($this, $field);
        } catch (\Exception $exc) {
            throw new \Exception("Property $field does not exist for " . get_class());
        }

        return SearchAnalyser::analyse($data);
    }
472901
public function offsetGet($field) {
        if (isset($this->values[$field]) || $this->load($field)) {
            return $this->values[$field];
        }

        return NULL;
    }
1346953
public function value($field) {
        $this->fields = [];
        $this->order("");
        $this->fields($field);
        $this->limit(0, 1);
        $connection = Pool::get(Connection::class);
        try {
            $value = $connection->value($this->getSql(), $this->whereParams(), $this->cache);
            Pool::release($connection);
            return $value;
        } catch (\RuntimeException $e) {
            Pool::release($connection);
            throw $e;
        } catch (\Error $e) {
            Pool::release($connection);
            throw $e;
        }
    }