FOF30\Model\DataModel::__get PHP Method

__get() public method

Tip: Trying to get fltSomething will always return the value of the state variable "something" Tip: You can define custom field getter methods as getFieldNameAttribute, where FieldName is your field's name, in CamelCase (even if the field name itself is in snake_case).
public __get ( string $name ) : static | mixed
$name string The name of the field / state variable to retrieve
return static | mixed
    public function __get($name)
    {
        // Handle $this->input
        if ($name == 'input') {
            return $this->container->input;
        }
        $isState = false;
        if (substr($name, 0, 3) == 'flt') {
            $isState = true;
            $name = strtolower(substr($name, 3, 1)) . substr($name, 4);
        }
        // If $name is a field name, get its value
        if (!$isState && array_key_exists($name, $this->recordData)) {
            return $this->getFieldValue($name);
        } elseif (!$isState && array_key_exists($name, $this->aliasFields) && array_key_exists($this->aliasFields[$name], $this->recordData)) {
            $name = $this->aliasFields[$name];
            return $this->getFieldValue($name);
        } elseif ($this->relationManager->isMagicProperty($name)) {
            return $this->relationManager->{$name};
        } else {
            return $this->getState($name);
        }
    }