BxDol.php 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271
  1. <?php defined('BX_DOL') or defined('BX_DOL_INSTALL') or die('hack attempt');
  2. /**
  3. * Copyright (c) UNA, Inc - https://una.io
  4. * MIT License - https://opensource.org/licenses/MIT
  5. */
  6. /**
  7. * @page objects Objects
  8. * Classes which represents high level programming constructions to generate ready functionality, like Comments, Votings, Forms.
  9. *
  10. * @section captcha CAPTCHA
  11. * @ref BxDolCaptcha
  12. *
  13. * @section category Category
  14. * @ref BxDolCategory
  15. *
  16. * @section comments Comments
  17. * @ref BxDolCmts
  18. *
  19. * @section connection Connection
  20. * @ref BxDolConnection
  21. *
  22. * @section content_info Content Info
  23. * @ref BxDolContentInfo
  24. *
  25. * @section cover Cover
  26. * @ref BxDolCover
  27. *
  28. * @section editor Editor
  29. * @ref BxDolEditor
  30. *
  31. * @section email_templates Email Templates
  32. * @ref BxDolEmailTemplates
  33. *
  34. * @section favorites Favorites
  35. * @ref BxDolFavorite
  36. *
  37. * @section feature Feature
  38. * @ref BxDolFeature
  39. *
  40. * @section file_handler File View Handlers
  41. * @ref BxDolFileHandler
  42. *
  43. * @section forms Forms
  44. * @ref BxDolForm
  45. *
  46. * @section grid Grid
  47. * @ref BxDolGrid
  48. *
  49. * @section informer Informer
  50. * @ref BxDolInformer
  51. *
  52. * @section key Keys
  53. * @ref BxDolKey
  54. *
  55. * @section live_updates Live Updates
  56. * @ref BxDolLiveUpdates
  57. *
  58. * @section menu Menu
  59. * @ref BxDolMenu
  60. *
  61. * @section metatags Meta Tags
  62. * @ref BxDolMetatags
  63. *
  64. * @section page Page
  65. * @ref BxDolPage
  66. *
  67. * @section permalinks Permalinks
  68. * @ref BxDolPermalinks
  69. *
  70. * @section privacy Privacy
  71. * @ref BxDolPrivacy
  72. *
  73. * @section reports Reports
  74. * @ref BxDolReport
  75. *
  76. * @section rss RSS
  77. * @ref BxDolRss
  78. *
  79. * @section search Search
  80. * @ref BxDolSearch
  81. *
  82. * @section storage Storage
  83. * @ref BxDolStorage
  84. *
  85. * @section transcoder_images Transcoder: Images
  86. * @ref BxDolTranscoderImage
  87. *
  88. * @section transcoder_proxy Transcoder: Proxy
  89. * @ref BxDolTranscoderProxy
  90. *
  91. * @section transcoder_videos Transcoder: Videos
  92. * @ref BxDolTranscoderVideo
  93. *
  94. * @section uploader Uploader
  95. * @ref BxDolUploader
  96. *
  97. * @section views Views
  98. * @ref BxDolView
  99. *
  100. * @section votes Votes
  101. * @ref BxDolVote
  102. */
  103. /**
  104. * @page public_api API Public
  105. * Public API for getting secure token for @ref private_api calls and other calls which don't require user authentication
  106. */
  107. /**
  108. * @page private_api API Private
  109. * Private API, which uses secure token for communication, token can be retrived via @ref public_api
  110. */
  111. /**
  112. * @page service Service Calls
  113. * Service calls
  114. */
  115. /**
  116. * @defgroup UnaCore UNA Core
  117. * @{
  118. */
  119. /**
  120. * Classes instances are stored here
  121. */
  122. $GLOBALS['bxDolClasses'] = array();
  123. /**
  124. * Base class for all classes
  125. */
  126. class BxDol
  127. {
  128. public function __construct () {}
  129. }
  130. /**
  131. * Singleton interface, for objects with one instance only
  132. */
  133. interface iBxDolSingleton
  134. {
  135. public static function getInstance();
  136. }
  137. /**
  138. * Factory interface for object instances, once instance per object name
  139. */
  140. interface iBxDolFactoryObject
  141. {
  142. static public function getObjectInstance($sObject);
  143. }
  144. /**
  145. * Replacable interface, class has an ability to replace markers somewhere
  146. */
  147. interface iBxDolReplaceable
  148. {
  149. public function addMarkers ($a);
  150. }
  151. /**
  152. * Profile interface, class must implement basic profile methods to be compliant with Profile interface
  153. */
  154. interface iBxDolProfile
  155. {
  156. public function id();
  157. public function getDisplayName();
  158. public function getUrl();
  159. public function getUnit();
  160. public function hasImage();
  161. public function getPicture();
  162. public function getAvatar();
  163. public function getCover();
  164. public function getThumb();
  165. public function getIcon();
  166. public function getIconModule();
  167. public function getEditUrl();
  168. public function isActive();
  169. public function isOnline();
  170. public function getModule();
  171. /**
  172. * Check profile visibility
  173. * @return message on error, or CHECK_ACTION_RESULT_ALLOWED when allowed
  174. */
  175. public function checkAllowedProfileView();
  176. /**
  177. * Check if posting in profile is allowed
  178. * @return message on error, or CHECK_ACTION_RESULT_ALLOWED when allowed
  179. */
  180. public function checkAllowedPostInProfile();
  181. }
  182. /**
  183. * Profile services module interface, module class must implement basic profile services to be compliant with Profile interface
  184. */
  185. interface iBxDolProfileService
  186. {
  187. public function serviceProfileUnit ($iContentId);
  188. public function serviceProfilePicture ($iContentId);
  189. public function serviceProfileAvatar ($iContentId);
  190. public function serviceProfileCover ($iContentId);
  191. public function serviceProfileThumb ($iContentId);
  192. public function serviceProfileIcon ($iContentId);
  193. public function serviceProfileName ($iContentId);
  194. public function serviceProfileUrl ($iContentId);
  195. public function serviceProfileEditUrl ($iContentId);
  196. /**
  197. * Check profile visibility
  198. * @param $iContentId content ID
  199. * @return message on error, or CHECK_ACTION_RESULT_ALLOWED when allowed
  200. */
  201. public function serviceCheckAllowedProfileView($iContentId);
  202. /**
  203. * Check if posting in profile is allowed, for example posting in profile's timeline
  204. * @param $iContentId content ID
  205. * @return message on error, or CHECK_ACTION_RESULT_ALLOWED when allowed
  206. */
  207. public function serviceCheckAllowedPostInProfile($iContentId);
  208. /**
  209. * Get profiles, current profile have relation with, like friends, joined groups and events
  210. * @param $iProfileId profile to get relations for
  211. * @param $aConnectionObject look for relations in these connection objects
  212. * @return array
  213. */
  214. public function serviceGetParticipatingProfiles($iProfileId, $aConnectionObject = false);
  215. /**
  216. * Get space title
  217. * @return string
  218. */
  219. public function serviceGetSpaceTitle();
  220. /**
  221. * Check space privacy, when some profile is used for privacy checking of some content
  222. * @param $iContentId content ID
  223. * @return message on error, or CHECK_ACTION_RESULT_ALLOWED when allowed
  224. */
  225. public function serviceCheckSpacePrivacy($iContentId);
  226. public function serviceProfilesSearch ($sTerm, $iLimit);
  227. public function serviceFormsHelper ();
  228. public function serviceActAsProfile ();
  229. public function servicePrepareFields ($aFieldsProfile);
  230. }
  231. /**
  232. * Content info services module interface, module class must implement basic content info services to be compliant with ContentInfo interface
  233. */
  234. interface iBxDolContentInfoService
  235. {
  236. public function serviceGetAuthor ($iContentId);
  237. public function serviceGetDateAdded ($iContentId);
  238. public function serviceGetDateChanged ($iContentId);
  239. public function serviceGetLink ($iContentId);
  240. public function serviceGetTitle ($iContentId);
  241. public function serviceGetText ($iContentId);
  242. public function serviceGetThumb ($iContentId);
  243. public function serviceGetInfo ($iContentId, $bSearchableFieldsOnly = true);
  244. public function serviceGetSearchResultUnit ($iContentId, $sUnitTemplate = '');
  245. public function serviceGetAll ($aParams = array());
  246. public function serviceGetSearchableFieldsExtended();
  247. public function serviceGetSearchResultExtended($aParams, $iStart = 0, $iPerPage = 0);
  248. }
  249. /** @} */