FOF30\Model\DataModel::__isset PHP Method

__isset() public method

Magic checker on a property. It follows the same logic of the __get magic method, however, if nothing is found, it won't return the state of a variable (we are checking if a property is set)
public __isset ( string $name ) : boolean
$name string The name of the field to check
return boolean Is the field set?
    public function __isset($name)
    {
        $value = null;
        $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)) {
            $value = $this->getFieldValue($name);
        } elseif (!$isState && array_key_exists($name, $this->aliasFields) && array_key_exists($this->aliasFields[$name], $this->recordData)) {
            $name = $this->aliasFields[$name];
            $value = $this->getFieldValue($name);
        } elseif ($this->relationManager->isMagicProperty($name)) {
            $value = $this->relationManager->{$name};
        }
        // As the core function isset, the property must exists AND must be NOT null
        return $value !== null;
    }