-
-
Notifications
You must be signed in to change notification settings - Fork 345
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Initial working for encode/decode functionality * Changed markup for PHP * Adjust encode/decode methods * Modified ParseRelation for proper encoding, intended for usage in encode/decode for ParseObject * Later fetch to pass on travis * Checking formatted dates to avoid issues with microseconds having 6 digits natively in php and 3 digits for parse * Removed redundant code path for ACL data, is always handled & removed in advance * Removed redundant check & fixed exception message typo * removed additional redundant check & upped tests * Use 'operationSet' instead of estimatedData for a more accurate snapshot * lint * Using dates formatted for parse server
- Loading branch information
Benjamin Wilson Friedman
authored
Sep 8, 2017
1 parent
9ecd520
commit 89f38f7
Showing
6 changed files
with
446 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,7 @@ | |
|
||
namespace Parse; | ||
|
||
use Parse\Internal\Encodable; | ||
use Parse\Internal\ParseRelationOperation; | ||
|
||
/** | ||
|
@@ -14,7 +15,7 @@ | |
* @author Mohamed Madbouli <[email protected]> | ||
* @package Parse | ||
*/ | ||
class ParseRelation | ||
class ParseRelation implements Encodable | ||
{ | ||
/** | ||
* The parent of this relation. | ||
|
@@ -124,4 +125,17 @@ public function getQuery() | |
|
||
return $query; | ||
} | ||
|
||
/** | ||
* Return an encoded array of this relation. | ||
* | ||
* @return array | ||
*/ | ||
public function _encode() | ||
{ | ||
return [ | ||
'__type' => 'Relation', | ||
'className' => $this->targetClassName | ||
]; | ||
} | ||
} |
Oops, something went wrong.