Jyxo\Spl\Object::__isset PHP Method

__isset() public method

Returns if property exists. Property exists if it has defined getter.
public __isset ( string $name ) : boolean
$name string
return boolean
    public function __isset(string $name) : bool
    {
        $class = get_class($this);
        $name = ucfirst($name);
        // Tests for possible getters
        static $types = ['get', 'is'];
        foreach ($types as $type) {
            $getter = $type . $name;
            if (self::hasMethod($class, $getter)) {
                return true;
            }
        }
        return false;
    }