1 | <?php |
||
34 | class NoteService { |
||
35 | |||
36 | private $noteMapper; |
||
37 | private $utils; |
||
38 | private $sharing; |
||
39 | private $groupService; |
||
40 | |||
41 | public function __construct(NoteMapper $noteMapper, Utils $utils, NextNoteShareBackend $shareBackend, NotebookService $groupService) { |
||
47 | |||
48 | /** |
||
49 | * Get vaults from a user. |
||
50 | * |
||
51 | * @param $userId |
||
52 | * @param int|bool $deleted |
||
53 | * @param string|bool $grouping |
||
54 | * @return Note[] |
||
55 | */ |
||
56 | public function findNotesFromUser($userId, $deleted = false, $grouping = false) { |
||
64 | |||
65 | /** |
||
66 | * Get a single vault |
||
67 | * |
||
68 | * @param $note_id |
||
69 | * @param $user_id |
||
70 | * @param bool|int $deleted |
||
71 | * @return Note |
||
72 | * @internal param $vault_id |
||
73 | */ |
||
74 | public function find($note_id, $user_id = null, $deleted = false) { |
||
78 | |||
79 | /** |
||
80 | * Creates a note |
||
81 | * |
||
82 | * @param Note $note |
||
83 | * @return Note |
||
84 | * @throws \Exception |
||
85 | */ |
||
86 | public function create(Note $note) { |
||
93 | |||
94 | /** |
||
95 | * Update vault |
||
96 | * |
||
97 | * @param $note Note |
||
98 | * @return Note|bool |
||
99 | * @throws \Exception |
||
100 | * @internal param $userId |
||
101 | * @internal param $vault |
||
102 | */ |
||
103 | public function update(Note $note) { |
||
110 | |||
111 | /** |
||
112 | * Delete a vault from user |
||
113 | * |
||
114 | * @param $note_id |
||
115 | * @param string $user_id |
||
116 | * @return bool |
||
117 | * @internal param string $vault_guid |
||
118 | */ |
||
119 | public function delete($note_id, $user_id = null) { |
||
128 | |||
129 | |||
130 | /** |
||
131 | * @param $FOLDER |
||
132 | * @param boolean $showdel |
||
133 | * @return array |
||
134 | * @throws \Exception |
||
135 | */ |
||
136 | public function getListing($FOLDER, $showdel) { |
||
139 | |||
140 | } |
||
141 |