private function formMessageData(Message $message)
    {
        $data = array(
            'registration_ids' => $message->getRegistrationIds(),
        );

        $dataFields = array(
            'registration_ids' => 'getRegistrationIds',
            'collapse_key' => 'getCollapseKey',
            'data' => 'getData',
            'notification' => 'getNotification',
            'delay_while_idle' => 'getDelayWhileIdle',
            'time_to_live' => 'getTtl',
            'restricted_package_name' => 'getRestrictedPackageName',
            'dry_run' => 'getDryRun',
            'content_available' => 'getContentAvailable',
            'priority' => 'getPriority',
        );

        foreach ($dataFields as $fieldName => $getter) {
            if ($message->$getter() != null) {
                $data[$fieldName] = $message->$getter();
            }
        }

        return $data;
    }
private function formMessageData(Message $message)
    {
        $data = array(
            'registration_ids' => $message->getRegistrationIds(),
        );

        $dataFields = array(
            'registration_ids' => 'getRegistrationIds',
            'collapse_key' => 'getCollapseKey',
            'data' => 'getData',
            'notification' => 'getNotification',
            'delay_while_idle' => 'getDelayWhileIdle',
            'time_to_live' => 'getTtl',
            'restricted_package_name' => 'getRestrictedPackageName',
            'dry_run' => 'getDryRun',
            'content_available' => 'getContentAvailable',
            'priority' => 'getPriority',
        );

        foreach ($dataFields as $fieldName => $getter) {
            if ($message->$getter() != null) {
                $data[$fieldName] = $message->$getter();
            }
        }

        return $data;
    }
private function formMessageData ( Message $ message ) { $ data = array ( 'registration_ids' => $ message -> getRegistrationIds ( ) , ) ; $ dataFields = array ( 'registration_ids' => 'getRegistrationIds' , 'collapse_key' => 'getCollapseKey' , 'data' => 'getData' , 'notification' => 'getNotification' , 'delay_while_idle' => 'getDelayWhileIdle' , 'time_to_live' => 'getTtl' , 'restricted_package_name' => 'getRestrictedPackageName' , 'dry_run' => 'getDryRun' , 'content_available' => 'getContentAvailable' , 'priority' => 'getPriority' , ) ; foreach ( $ dataFields as $ fieldName => $ getter ) { if ( $ message -> $ getter ( ) != null ) { $ data [ $ fieldName ] = $ message -> $ getter ( ) ; } } return $ data ; }
Form raw message data for sending to GCM

@param \CodeMonkeysRu\GCM\Message $message
@return array
Form raw message data for sending to GCM