protected function insertObjectProperties(FormObject $instance)
    {
        $className = $instance->getClassName();

        /** @var ReflectionService $reflectionService */
        $reflectionService = GeneralUtility::makeInstance(ReflectionService::class);
        $reflectionProperties = $reflectionService->getClassPropertyNames($className);

        $classReflection = new \ReflectionClass($className);
        $publicProperties = $classReflection->getProperties(\ReflectionProperty::IS_PUBLIC);

        foreach ($reflectionProperties as $property) {
            if (false === in_array($property, self::$ignoredProperties)
                && false === $reflectionService->isPropertyTaggedWith($className, $property, self::IGNORE_PROPERTY)
                && ((true === in_array($property, $publicProperties))
                    || $reflectionService->hasMethod($className, 'get' . ucfirst($property))
                )
            ) {
                $instance->addProperty($property);
            }
        }

        unset($publicProperties);
    }
protected function insertObjectProperties(FormObject $instance)
    {
        $className = $instance->getClassName();

        /** @var ReflectionService $reflectionService */
        $reflectionService = GeneralUtility::makeInstance(ReflectionService::class);
        $reflectionProperties = $reflectionService->getClassPropertyNames($className);

        $classReflection = new \ReflectionClass($className);
        $publicProperties = $classReflection->getProperties(\ReflectionProperty::IS_PUBLIC);

        foreach ($reflectionProperties as $property) {
            if (false === in_array($property, self::$ignoredProperties)
                && false === $reflectionService->isPropertyTaggedWith($className, $property, self::IGNORE_PROPERTY)
                && ((true === in_array($property, $publicProperties))
                    || $reflectionService->hasMethod($className, 'get' . ucfirst($property))
                )
            ) {
                $instance->addProperty($property);
            }
        }

        unset($publicProperties);
    }
protected function insertObjectProperties ( FormObject $ instance ) { $ className = $ instance -> getClassName ( ) ; /** @var ReflectionService $reflectionService */ $ reflectionService = GeneralUtility :: makeInstance ( ReflectionService :: class ) ; $ reflectionProperties = $ reflectionService -> getClassPropertyNames ( $ className ) ; $ classReflection = new \ ReflectionClass ( $ className ) ; $ publicProperties = $ classReflection -> getProperties ( \ ReflectionProperty :: IS_PUBLIC ) ; foreach ( $ reflectionProperties as $ property ) { if ( false === in_array ( $ property , self :: $ ignoredProperties ) && false === $ reflectionService -> isPropertyTaggedWith ( $ className , $ property , self :: IGNORE_PROPERTY ) && ( ( true === in_array ( $ property , $ publicProperties ) ) || $ reflectionService -> hasMethod ( $ className , 'get' . ucfirst ( $ property ) ) ) ) { $ instance -> addProperty ( $ property ) ; } } unset ( $ publicProperties ) ; }
Will insert all the accessible properties of the given instance.

@param FormObject $instance
Will insert all the accessible properties of the given instance .