src/Identity/SocialRecordManager.php
public static function exportSocialRecord(SocialRecord $socialRecord, KeyPair $accountKeyPair = NULL, KeyPair $personalKeyPair = NULL)
	{
		$json = new JSONObject();
		
		$json->put('socialRecord', $socialRecord->getJSONObject());
		
		if($accountKeyPair != NULL)
			$json->put('accountPrivateKey', PrivateKey::exportKey($accountKeyPair->getPrivateKey()));
		
		if($personalKeyPair != NULL)
			$json->put('personalPrivateKey', PrivateKey::exportKey($personalKeyPair->getPrivateKey()));
		
		return $json->write();
	}
public static function exportSocialRecord(SocialRecord $socialRecord, KeyPair $accountKeyPair = NULL, KeyPair $personalKeyPair = NULL)
	{
		$json = new JSONObject();
		
		$json->put('socialRecord', $socialRecord->getJSONObject());
		
		if($accountKeyPair != NULL)
			$json->put('accountPrivateKey', PrivateKey::exportKey($accountKeyPair->getPrivateKey()));
		
		if($personalKeyPair != NULL)
			$json->put('personalPrivateKey', PrivateKey::exportKey($personalKeyPair->getPrivateKey()));
		
		return $json->write();
	}
public static function exportSocialRecord ( SocialRecord $ socialRecord , KeyPair $ accountKeyPair = NULL , KeyPair $ personalKeyPair = NULL ) { $ json = new JSONObject ( ) ; $ json -> put ( 'socialRecord' , $ socialRecord -> getJSONObject ( ) ) ; if ( $ accountKeyPair != NULL ) $ json -> put ( 'accountPrivateKey' , PrivateKey :: exportKey ( $ accountKeyPair -> getPrivateKey ( ) ) ) ; if ( $ personalKeyPair != NULL ) $ json -> put ( 'personalPrivateKey' , PrivateKey :: exportKey ( $ personalKeyPair -> getPrivateKey ( ) ) ) ; return $ json -> write ( ) ; }
Exports a SocialRecord object to a serialized JSONObject

@param SocialRecord The SocialRecord to export
@param KeyPair account key pair to export
@param KeyPair personal key pair to export
@return string The exported SocialRecord
Exports a SocialRecord object to a serialized JSONObject