/
FileSharingInfo.php
71 lines (63 loc) 路 1.49 KB
/
FileSharingInfo.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
<?php
namespace Kunnu\Dropbox\Models;
class FileSharingInfo extends BaseModel
{
/**
* True if the file or folder is inside a read-only shared folder.
*
* @var bool
*/
protected $read_only;
/**
* ID of shared folder that holds this file.
*
* @var string
*/
protected $parent_shared_folder_id;
/**
* The last user who modified the file.
* This field will be null if the user's account has been deleted.
*
* @var string
*/
protected $modified_by;
/**
* Create a new File Sharing Info instance
*
* @param array $data
*/
public function __construct(array $data)
{
parent::__construct($data);
$this->read_only = $this->getDataProperty('read_only');
$this->modified_by = $this->getDataProperty('modified_by');
$this->parent_shared_folder_id = $this->getDataProperty('parent_shared_folder_id');
}
/**
* True if the file or folder is inside a read-only shared folder.
*
* @return bool
*/
public function isReadOnly()
{
return $this->read_only;
}
/**
* ID of shared folder that holds this file.
*
* @return string
*/
public function getParentSharedFolderId()
{
return $this->parent_shared_folder_id;
}
/**
* Get the last user who modified the file.
*
* @return string
*/
public function getModifiedBy()
{
return $this->modified_by;
}
}