-
-
Notifications
You must be signed in to change notification settings - Fork 342
Making ParseUser and ParseRole subclassable #84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Making ParseUser and ParseRole subclassable #84
Conversation
Sorry, one more note: these changes would enable you to easily make |
0031424
to
1b48f94
Compare
@@ -90,7 +90,7 @@ public function isAuthenticated() | |||
/** | |||
* Signs up the current user, or throw if invalid. | |||
* This will create a new ParseUser on the server, and also persist the | |||
* session so that you can access the user using ParseUser::getCurrentUser();. | |||
* session so that you can access the user using static::getCurrentUser();. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lets not change this function comment.. it's not valid outside of the class. Those who are subclassing can use their classname interchangeably... but it also looks like ParseUser::getCurrentUser() would return the subclassed version as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah good catch. I'll fix that now.
If you can address the comment I made and rebase, I'll look at merging it. Still need to have a conversation internally, because we're looking at fixing this in another SDK and want to make sure it is consistent. |
6a856a2
to
9b5ac51
Compare
9b5ac51
to
1aae98f
Compare
@gfosco Done |
Making ParseUser and ParseRole subclassable
I should've merged this before tagging 1.1.1... Oh well, I'll merge this now. Thanks HipsterJazzbo! |
This makes a few adjustments to make
ParseUser
andParseRole
subclassable.Most of the changes are pretty self-explanitory, however a note about the
ParseObject::getRegisteredSubclass()
method: This is very useful to be able to dynamically retrieve the correct registered subclass for a given Parse class. I'm using this method in my Laravel integration package to provide authentication drivers, among other things.This PR addresses #42.
Thanks!