Class ParseUser - Representation of a user object stored on Parse.
author |
Fosco Marotto [email protected] |
---|---|
package |
Parse |
__construct(string $className = null, mixed $objectId = null, boolean $isPointer = false)
Creates a pointer object if an objectId is provided, otherwise creates a new object.
Throws |
|
---|
string
Class Name for data on Parse.
mixed
Object Id for Existing object.
boolean
__get(string $key) : mixed
string
Key to retrieve from the Object.
mixed
__isset(string $key) : boolean
string
Key to check on the object.
boolean
__set(string $key, mixed $value)
Throws |
|
---|
string
Key to set a value on.
mixed
Value to assign.
_clearCurrentUserVariable()
_encode() : string
string
_isDataAvailable(string $key) : boolean
string
Key to check availability of
boolean
_isDirty(boolean $considerChildren) : boolean
boolean
Whether to consider children when checking for dirty state
boolean
_mergeAfterFetch(array $result, boolean $completeData = true)
array
Data retrieved from the server.
boolean
Fetch all data or not.
_mergeAfterFetchWithSelectedKeys(array $result, array $selectedKeys)
array
Data retrieved from the server.
array
Keys to be fetched. Null or empty means all data will be fetched.
_mergeMagicFields( &$data)
_performOperation(string $key, \Parse\Internal\FieldOperation $operation)
string
Key to perform an operation upon.
_toPointer() : array
Throws |
|
---|
array
_unregisterSubclass()
Cannot be called on the base class ParseObject.
add(string $key, mixed $value)
string
Key for array value on object to add a value to.
mixed
Value to add.
addUnique(string $key, mixed $value)
string
Key for array value on object.
mixed
Value list to add uniquely.
applyOperations(array $operations, &$target)
array
Operations set to apply.
become(string $sessionToken) : \Parse\ParseUser
beforeSave() : void
canBeSerialized() : boolean
boolean
canBeSerializedAsValue(mixed $object) : boolean
mixed
The value to check.
boolean
clear()
clearAnonymousAuthData()
create(string $className, string $objectId = null, boolean $isPointer = false) : \Parse\ParseObject
string
Class Name for data on Parse.
string
Unique identifier for existing object.
boolean
If the object is a pointer.
\Parse\ParseObject
decode(string|array $encoded) : \Parse\ParseObject
Throws |
|
---|
string|array
Encoded ParseObject to decode
\Parse\ParseObject
deepSave(\Parse\ParseObject|array $target, boolean $useMasterKey = false, integer $batchSize = 40)
Throws |
|
---|
\Parse\ParseObject|array
boolean
Whether to use the Master Key.
integer
Number of objects to process per request
delete(string $key)
string
Key to remove from object.
destroy(boolean $useMasterKey = false)
boolean
Whether to use the master key.
destroyAll(array $objects, boolean $useMasterKey = false, integer $batchSize = 40)
Throws |
|
---|
array
Objects to destroy.
boolean
Whether to use the master key or not.
integer
Number of objects to process per request
destroyBatch(array<mixed,\Parse\ParseObject> $objects, boolean $useMasterKey = false) : array
Throws |
|
---|
array<mixed,\Parse\ParseObject>
boolean
array
encode() : string
string
exists(boolean $useMasterKey = false) : boolean
boolean
Whether to use the Master Key.
boolean
fetch(boolean $useMasterKey = false) : \Parse\ParseObject
boolean
Whether to use the master key and override ACLs
\Parse\ParseObject
Returns self, so you can chain this call.
fetchAll(array $objects, boolean $useMasterKey = false) : array
array
The ParseObjects to fetch
boolean
Whether to override ACLs
array
findUnsavedChildren(\Parse\ParseObject $object, &$unsavedChildren, &$unsavedFiles)
get(string $key) : mixed
Throws |
|
---|
string
Key to retrieve from the estimatedData array.
mixed
getACLWithCopy(boolean $mayCopy) : \Parse\ParseACL|null
getAllKeys() : array
array
getClassName() : string
string
getCreatedAt() : \DateTime|null
\DateTime|null
getCurrentUser() : \Parse\ParseUser|null
getEmail() : string|null
string|null
getObjectId() : string|null
string|null
getRegisteredSubclass( $parseClassName) : \Parse\ParseObject
getRelation(string $key, string $className = null) : \Parse\ParseRelation
string
The key to access the relation for.
string
The target class name.
\Parse\ParseRelation
The ParseRelation object if the relation already exists for the key or can be created for this key.
getSaveJSON() : array
array
getSessionToken() : string|null
string|null
getSubclass()
getUpdatedAt() : \DateTime|null
\DateTime|null
getUsername() : string|null
string|null
handleSaveResult(boolean $makeCurrent = false)
boolean
Whether to set the current user.
has(string $key) : boolean
string
Key to check
boolean
hasDirtyChildren() : boolean
boolean
hasRegisteredSubclass( $parseClassName) : boolean
boolean
increment(string $key, integer $value = 1)
string
Key for numeric value on object to increment.
integer
Value to increment by.
isAuthenticated() : boolean
boolean
isCurrent() : boolean
boolean
isDataAvailable() : boolean
boolean
isDirty() : boolean
boolean
isKeyDirty(string $key) : boolean
string
boolean
linkWith(string $serviceName, array $authData, boolean $useMasterKey = false) : \Parse\ParseUser
string
the name of the service
array
the array of auth data for $serviceName
boolean
Whether or not to use the master key, default is false
\Parse\ParseUser
linkWithFacebook(string $id, string $access_token, \DateTime $expiration_date = null, boolean $useMasterKey = false) : \Parse\ParseUser
Throws |
|
---|
string
the Facebook user identifier
string
the access token for this session
\DateTime
defaults to 60 days
boolean
whether to override security
\Parse\ParseUser
linkWithTwitter(string $id, string $screen_name, string $consumer_key, string $consumer_secret = null, string $auth_token, string $auth_token_secret, boolean $useMasterKey = false) : \Parse\ParseUser
Throws |
|
---|
string
the Twitter user identifier
string
the user's Twitter handle
string
the application's consumer key
string
the application's consumer secret
string
the authorized Twitter token for the user
string
the secret associated with $auth_token
boolean
whether to override security
\Parse\ParseUser
logIn(string $username, string $password) : \Parse\ParseUser
logInWith(string $serviceName, array $authData) : \Parse\ParseUser
string
the name of the service
array
the array of auth data for $serviceName
\Parse\ParseUser
loginWithAnonymous() : \Parse\ParseUser
link |
http://parseplatform.org/docs/rest/guide/#anonymous-user-authdata |
---|---|
Throws |
|
\Parse\ParseUser
logInWithFacebook(string $id, string $access_token, \DateTime $expiration_date = null) : \Parse\ParseUser
Throws |
|
---|
string
the Facebook user identifier
string
the access token for this session
\DateTime
defaults to 60 days
\Parse\ParseUser
logInWithTwitter(string $id, string $screen_name, string $consumer_key, string $consumer_secret = null, string $auth_token, string $auth_token_secret) : \Parse\ParseUser
Throws |
|
---|
string
the Twitter user identifier
string
the user's Twitter handle
string
the application's consumer key
string
the application's consumer secret
string
the authorized Twitter token for the user
string
the secret associated with $auth_token
\Parse\ParseUser
logOut()
This will make a network request to logout to invalidate the session.
mergeAfterSave(array $result)
array
Data retrieved from server.
mergeFromObject(\Parse\ParseObject $other)
mergeFromServer(array $data, boolean $completeData = true)
array
Data retrieved from server.
boolean
Fetch all data or not.
query() : \Parse\ParseQuery
rebuildEstimatedData()
registerSubclass()
Cannot be called on the base class ParseObject.
Throws |
|
---|
remove(string $key, mixed $value)
Throws |
|
---|
string
Key to remove the value from on the object.
mixed
Value to remove from the array.
requestPasswordReset(string $email)
string
requestVerificationEmail(string $email)
string
Email to request a verification for
revert()
save(boolean $useMasterKey = false)
boolean
Whether to use the Master Key.
saveAll(array $list, boolean $useMasterKey = false, integer $batchSize = 40)
array
boolean
Whether to use the Master Key.
integer
Number of objects to process per request
saveCurrentUser()
set(string $key, mixed $value)
Throws |
|
---|
string
Key to set a value for on the object.
mixed
Value to set on the key.
setArray(string $key, array $value)
Throws |
|
---|
string
Key to set the value for on the object.
array
Value to set on the key.
setAssociativeArray(string $key, array $value)
Throws |
|
---|
string
Key to set the value for on the object.
array
Value to set on the key.
setEmail(string $email)
string
The email address
setPassword(string $password)
string
The password
setUsername(string $username)
string
The username
signUp()
This will create a new ParseUser on the server, and also persist the session so that you can access the user using ParseUser::getCurrentUser();.
toObjectIdArray(array $objects) : array
Throws |
|
---|
array
Objects to create id array from
array
traverse(boolean $deep, &$object, callable $mapFunction, array $seen = array()) : mixed
boolean
Should this call traverse deeply
callable
Function to call for every item.
array
Objects already seen.
mixed
The result of calling mapFunction on the root object.
updateWithFetchedResults(array $objects, array $fetched) : array
Throws |
|
---|
array
Original objects to update
array
Fetched object data to update with
array
parseClassName : string
var |
---|
string
_sessionToken : string
var |
---|
string
serverData : array
var |
---|
array
operationSet : array
var |
---|
array
estimatedData : array
var |
---|
array
dataAvailability : array
var |
---|
array
className : string
var |
---|
string
objectId : string
var |
---|
string
createdAt : \DateTime
var |
---|
\DateTime
updatedAt : \DateTime
var |
---|
\DateTime
hasBeenFetched : boolean
var |
---|
boolean
registeredSubclasses : array
var |
---|
array