parse.com-php-library
parse.com-php-library copied to clipboard
parseObject suggestion
public function __get($name) {
if($name != '_className'){
return $this->data[$name];
}
return NULL;
}
Actually might not need the if statement
How would this be used on the developer end?
Well, for example, if you set data, you can retrieve it like you would after you retrieved an object from the parse library:
$test = new parseObject('test');
$test->name = "jim";
echo "Name is: " . $test->name . "\n";
It would be nice also if after you saved an object, the objectId would be populated in the object:
$test->save();
echo "Saved with object id: " . $test->objectId . "\n";
Oh ok, I get it now. Yea I'll implement this is a good idea.
I have been trying to think up a good way to make things flow a little better like for example having the objectId readily available after a save. For now you can capture $test->save() into a variable to get the return from parse. Or for example after performing a parseObject->save() you can then do parseObject->get() without having to initiate it in another variable.
I'm just now sure how to do it all yet :). Maybe version 2.1 will have this stuff :)
Cool, sounds good. I definitely like it alot better. -jim
On Tue, Sep 4, 2012 at 10:25 PM, apotropaic [email protected]:
Oh ok, I get it now. Yea I'll implement this is a good idea.
I have been trying to think up a good way to make things flow a little better like for example having the objectId readily available after a save. For now you can capture $test->save() into a variable to get the return from parse. Or for example after performing a parseObject->save() you can then do parseObject->get() without having to initiate it in another variable.
I'm just now sure how to do it all yet :). Maybe version 2.1 will have this stuff :)
— Reply to this email directly or view it on GitHubhttps://github.com/apotropaic/parse.com-php-library/issues/40#issuecomment-8288059.