public function syncData($controller_data)
    {
        if (is_object($controller_data)) {
            $handler_data = $this->legacy_handler->getData();

            $refl_class = new \ReflectionClass(get_class($handler_data));
            $filter     = \ReflectionProperty::IS_PUBLIC
                | \ReflectionProperty::IS_PROTECTED
                | \ReflectionProperty::IS_PRIVATE;

            foreach ($refl_class->getProperties($filter) as $property) {
                $property->setAccessible(true);
                $property->setValue($handler_data, $property->getValue($controller_data));
                $property->setAccessible(false);
            }
        }

        return $this->legacy_handler->getData();
    }
public function syncData($controller_data)
    {
        if (is_object($controller_data)) {
            $handler_data = $this->legacy_handler->getData();

            $refl_class = new \ReflectionClass(get_class($handler_data));
            $filter     = \ReflectionProperty::IS_PUBLIC
                | \ReflectionProperty::IS_PROTECTED
                | \ReflectionProperty::IS_PRIVATE;

            foreach ($refl_class->getProperties($filter) as $property) {
                $property->setAccessible(true);
                $property->setValue($handler_data, $property->getValue($controller_data));
                $property->setAccessible(false);
            }
        }

        return $this->legacy_handler->getData();
    }
public function syncData ( $ controller_data ) { if ( is_object ( $ controller_data ) ) { $ handler_data = $ this -> legacy_handler -> getData ( ) ; $ refl_class = new \ ReflectionClass ( get_class ( $ handler_data ) ) ; $ filter = \ ReflectionProperty :: IS_PUBLIC | \ ReflectionProperty :: IS_PROTECTED | \ ReflectionProperty :: IS_PRIVATE ; foreach ( $ refl_class -> getProperties ( $ filter ) as $ property ) { $ property -> setAccessible ( true ) ; $ property -> setValue ( $ handler_data , $ property -> getValue ( $ controller_data ) ) ; $ property -> setAccessible ( false ) ; } } return $ this -> legacy_handler -> getData ( ) ; }
Sync the data from the controller data to the handler data.

@param mixed $controller_data
@return mixed
Sync the data from the controller data to the handler data .