usergrid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rockers...@apache.org
Subject [43/45] incubator-usergrid git commit: added one more example to users example to show how to get a nested values from the results agin using PHP Collection methods
Date Wed, 12 Nov 2014 01:15:48 GMT
added one more example to users example to show how to get a nested values from the results
agin using PHP Collection methods

Project: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/commit/1742b151
Tree: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/tree/1742b151
Diff: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/diff/1742b151

Branch: refs/heads/master
Commit: 1742b15186dd37ed7d91fb6b31d1dd6e9201c68c
Parents: a9fbc73
Author: Apps4u <jasonk@apps4u.com.au>
Authored: Tue Nov 11 14:47:31 2014 +1000
Committer: Apps4u <jasonk@apps4u.com.au>
Committed: Tue Nov 11 14:47:31 2014 +1000

----------------------------------------------------------------------
 sdks/php5/apache-usergrid/Examples/collections/users.php | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/1742b151/sdks/php5/apache-usergrid/Examples/collections/users.php
----------------------------------------------------------------------
diff --git a/sdks/php5/apache-usergrid/Examples/collections/users.php b/sdks/php5/apache-usergrid/Examples/collections/users.php
index 34a897d..9bcea83 100644
--- a/sdks/php5/apache-usergrid/Examples/collections/users.php
+++ b/sdks/php5/apache-usergrid/Examples/collections/users.php
@@ -91,7 +91,11 @@ echo $user_addr->entities->fetch('adr.addr1');
 //or
 echo $user_addr->entities->fetch('adr.city');
 
+// get users device URL -- nested fetch on php collection
+$users_nested = Usergrid::users()->all();
+var_dump($users_nested->entities->fetch('metadata.collections.devices')->first());
+
 // add user to group
 //$user_to_group = Usergrid::groups()->addUser(['entity_name_or_uuid' => 'group_name_or_uuid',
'user_name_or_uuid' => 'user name or uuid']);
 
-//$user_remove_group = Usergrid::groups()->removeUser(['entity_name_or_uuid' => 'group_name_or_uuid',
'user_name_or_uuid' => 'user name or uuid']);
\ No newline at end of file
+//$user_remove_group = Usergrid::groups()->removeUser(['entity_name_or_uuid' => 'group_name_or_uuid',
'user_name_or_uuid' => 'user name or uuid']);


Mime
View raw message