itagmanager.php 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. <?php
  2. /**
  3. * @author Bernhard Reiter <ockham@raz.or.at>
  4. * @author Morris Jobke <hey@morrisjobke.de>
  5. * @author Thomas Tanghus <thomas@tanghus.net>
  6. * @author Vincent Petry <pvince81@owncloud.com>
  7. *
  8. * @copyright Copyright (c) 2015, ownCloud, Inc.
  9. * @license AGPL-3.0
  10. *
  11. * This code is free software: you can redistribute it and/or modify
  12. * it under the terms of the GNU Affero General Public License, version 3,
  13. * as published by the Free Software Foundation.
  14. *
  15. * This program is distributed in the hope that it will be useful,
  16. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  17. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  18. * GNU Affero General Public License for more details.
  19. *
  20. * You should have received a copy of the GNU Affero General Public License, version 3,
  21. * along with this program. If not, see <http://www.gnu.org/licenses/>
  22. *
  23. */
  24. /**
  25. * Public interface of ownCloud for apps to use.
  26. * Tag manager interface
  27. *
  28. */
  29. // use OCP namespace for all classes that are considered public.
  30. // This means that they should be used by apps instead of the internal ownCloud classes
  31. namespace OCP;
  32. /**
  33. * Factory class creating instances of \OCP\ITags
  34. *
  35. * A tag can be e.g. 'Family', 'Work', 'Chore', 'Special Occation' or
  36. * anything else that is either parsed from a vobject or that the user chooses
  37. * to add.
  38. * Tag names are not case-sensitive, but will be saved with the case they
  39. * are entered in. If a user already has a tag 'family' for a type, and
  40. * tries to add a tag named 'Family' it will be silently ignored.
  41. * @since 6.0.0
  42. */
  43. interface ITagManager {
  44. /**
  45. * Create a new \OCP\ITags instance and load tags from db for the current user.
  46. *
  47. * @see \OCP\ITags
  48. * @param string $type The type identifier e.g. 'contact' or 'event'.
  49. * @param array $defaultTags An array of default tags to be used if none are stored.
  50. * @param boolean $includeShared Whether to include tags for items shared with this user by others.
  51. * @param string $userId user for which to retrieve the tags, defaults to the currently
  52. * logged in user
  53. * @return \OCP\ITags
  54. * @since 6.0.0 - parameter $includeShared and $userId were added in 8.0.0
  55. */
  56. public function load($type, $defaultTags = array(), $includeShared = false, $userId = null);
  57. }