public function buildViewData()
    {
        $data = $this->viewData;

        if (static::$viewDataCallback) {
            $data = array_merge($data, call_user_func(static::$viewDataCallback, $this));
        }

        foreach ((new ReflectionClass($this))->getProperties(ReflectionProperty::IS_PUBLIC) as $property) {
            if ($property->getDeclaringClass()->getName() !== self::class) {
                $data[$property->getName()] = $property->getValue($this);
            }
        }

        return $data;
    }
public function buildViewData()
    {
        $data = $this->viewData;

        if (static::$viewDataCallback) {
            $data = array_merge($data, call_user_func(static::$viewDataCallback, $this));
        }

        foreach ((new ReflectionClass($this))->getProperties(ReflectionProperty::IS_PUBLIC) as $property) {
            if ($property->getDeclaringClass()->getName() !== self::class) {
                $data[$property->getName()] = $property->getValue($this);
            }
        }

        return $data;
    }
public function buildViewData ( ) { $ data = $ this -> viewData ; if ( static :: $ viewDataCallback ) { $ data = array_merge ( $ data , call_user_func ( static :: $ viewDataCallback , $ this ) ) ; } foreach ( ( new ReflectionClass ( $ this ) ) -> getProperties ( ReflectionProperty :: IS_PUBLIC ) as $ property ) { if ( $ property -> getDeclaringClass ( ) -> getName ( ) !== self :: class ) { $ data [ $ property -> getName ( ) ] = $ property -> getValue ( $ this ) ; } } return $ data ; }
Build the view data for the message.

@return array

@throws \ReflectionException
Build the view data for the message .