diff options
author | Joas Schilling <coding@schilljs.com> | 2017-04-11 14:45:18 +0200 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2017-04-13 12:58:53 +0200 |
commit | f57ef5524902be35fb944aa871279cf7ad9777e1 (patch) | |
tree | d137d28f167e11ffb1f1d10e63d622397bcee987 /lib | |
parent | e1d54e3b48d68e3d631a6c6828b80ce49f414ea4 (diff) | |
download | nextcloud-server-f57ef5524902be35fb944aa871279cf7ad9777e1.tar.gz nextcloud-server-f57ef5524902be35fb944aa871279cf7ad9777e1.zip |
Add samples to the docs
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/Share20/ShareHelper.php | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/lib/private/Share20/ShareHelper.php b/lib/private/Share20/ShareHelper.php index 65186634463..358b4e8026a 100644 --- a/lib/private/Share20/ShareHelper.php +++ b/lib/private/Share20/ShareHelper.php @@ -60,6 +60,25 @@ class ShareHelper implements IShareHelper { } /** + * Sample: + * $users = [ + * 'test1' => ['node_id' => 16, 'node_path' => '/foo'], + * 'test2' => ['node_id' => 23, 'node_path' => '/bar'], + * 'test3' => ['node_id' => 42, 'node_path' => '/cat'], + * 'test4' => ['node_id' => 48, 'node_path' => '/dog'], + * ]; + * + * Node tree: + * - SixTeen is the parent of TwentyThree + * - TwentyThree is the parent of FortyTwo + * - FortyEight does not exist + * + * $return = [ + * 'test1' => '/foo/TwentyThree/FortyTwo', + * 'test2' => '/bar/FortyTwo', + * 'test3' => '/cat', + * ], + * * @param Node $node * @param array[] $users * @return array @@ -122,6 +141,25 @@ class ShareHelper implements IShareHelper { } /** + * Sample: + * $remotes = [ + * 'test1' => ['node_id' => 16, 'token' => 't1'], + * 'test2' => ['node_id' => 23, 'token' => 't2'], + * 'test3' => ['node_id' => 42, 'token' => 't3'], + * 'test4' => ['node_id' => 48, 'token' => 't4'], + * ]; + * + * Node tree: + * - SixTeen is the parent of TwentyThree + * - TwentyThree is the parent of FortyTwo + * - FortyEight does not exist + * + * $return = [ + * 'test1' => ['token' => 't1', 'node_path' => '/SixTeen'], + * 'test2' => ['token' => 't2', 'node_path' => '/SixTeen/TwentyThree'], + * 'test3' => ['token' => 't3', 'node_path' => '/SixTeen/TwentyThree/FortyTwo'], + * ], + * * @param Node $node * @param array[] $remotes * @return array |