PageRenderTime 30ms CodeModel.GetById 13ms RepoModel.GetById 0ms app.codeStats 0ms

/docs/latex/class_stats.tex

https://gitlab.com/karl3/gs_libs
LaTeX | 392 lines | 307 code | 85 blank | 0 comment | 0 complexity | 6346b4fbf2071e0344a85d44116d04c7 MD5 | raw file
  1. \hypertarget{class_stats}{\section{Stats Class Reference}
  2. \label{class_stats}\index{Stats@{Stats}}
  3. }
  4. Inherits \hyperlink{classdb_p_d_o}{db\-P\-D\-O}.
  5. \subsection*{Public Member Functions}
  6. \begin{DoxyCompactItemize}
  7. \item
  8. \hyperlink{class_stats_a9b576568bc17458490e6985a7489c3a9}{\-\_\-\-\_\-construct} (\$connection, \$current\-\_\-user=null, \$table\-Name= 'stats')
  9. \item
  10. \hyperlink{class_stats_a421831a265621325e1fdd19aace0c758}{\-\_\-\-\_\-destruct} ()
  11. \item
  12. \hyperlink{class_stats_a604a265217a1774947350bca38b39e01}{set\-Ignore} (\$array)
  13. \item
  14. \hyperlink{class_stats_aec6efc1f87114d251b6d91be90bc3ddd}{insert\-Stats} ()
  15. \item
  16. \hyperlink{class_stats_a017d22295900a75171f1a3e5b488eb09}{get\-Total\-Page\-Views} (\$start=null, \$end=null)
  17. \item
  18. \hyperlink{class_stats_aa186bab67dcb150d445b84e6ec52cfd9}{get\-Total\-Distinct\-Sessions} (\$start=null, \$end=null)
  19. \item
  20. \hyperlink{class_stats_ab8b13de24fa5d9e50a0d7cf9e9f1af32}{get\-Total\-Distinct\-I\-Ps} (\$start=null, \$end=null)
  21. \item
  22. \hyperlink{class_stats_a0c99010e511c7fc19ad59f16179524cb}{get\-Total\-Distinct\-U\-R\-Is} (\$start=null, \$end=null)
  23. \item
  24. \hyperlink{class_stats_a85991d88c2f5401b051cc554b04bdec8}{get\-Total\-Distinct\-User\-Agents} (\$start=null, \$end=null)
  25. \item
  26. \hyperlink{class_stats_aaf9ae81485efae3ce6f902ddac969a45}{get\-Total\-Distinct\-Pages} (\$start=null, \$end=null)
  27. \item
  28. \hyperlink{class_stats_a6c944fec89049927b811bd786a934e96}{get\-Total\-Distinct\-Users} (\$start=null, \$end=null)
  29. \item
  30. \hyperlink{class_stats_adf94df76cef17a9a175924473b71446e}{count\-Dates} (\$start, \$end)
  31. \item
  32. \hyperlink{class_stats_a025ccf47b1021dba92cb33c15b36e63b}{get\-First\-Date} ()
  33. \item
  34. \hyperlink{class_stats_a4de981ae1f7c64de95d1d98f001b3e5f}{get\-Last\-Date} ()
  35. \item
  36. \hyperlink{class_stats_af0592a90f0b14c809dad12c026a18b68}{get\-Raw\-Stats} (\$start=null, \$end=null, \$fields= '$\ast$')
  37. \end{DoxyCompactItemize}
  38. \subsection*{Data Fields}
  39. \begin{DoxyCompactItemize}
  40. \item
  41. \hypertarget{class_stats_aa7c64052a6704d3e4c8d4a17a506fed3}{{\bfseries \$\-Ignore}}\label{class_stats_aa7c64052a6704d3e4c8d4a17a506fed3}
  42. \item
  43. \hypertarget{class_stats_a0d9c79b9b86b3f5891c6d3892f12c6a0}{{\bfseries \$connection}}\label{class_stats_a0d9c79b9b86b3f5891c6d3892f12c6a0}
  44. \item
  45. \hypertarget{class_stats_a12f5443cc19cb33ae0292013c53a7b19}{{\bfseries \$current\-\_\-user}}\label{class_stats_a12f5443cc19cb33ae0292013c53a7b19}
  46. \item
  47. \hypertarget{class_stats_aea06aaf672e3fe5fbf45958ae2782244}{{\bfseries \$table\-Name}}\label{class_stats_aea06aaf672e3fe5fbf45958ae2782244}
  48. \end{DoxyCompactItemize}
  49. \subsection*{Additional Inherited Members}
  50. \subsection{Detailed Description}
  51. class for inserting and calculating basic web stats via database
  52. Definition at line 8 of file Stats.\-class.\-php.
  53. \subsection{Constructor \& Destructor Documentation}
  54. \hypertarget{class_stats_a9b576568bc17458490e6985a7489c3a9}{\index{Stats@{Stats}!\-\_\-\-\_\-construct@{\-\_\-\-\_\-construct}}
  55. \index{\-\_\-\-\_\-construct@{\-\_\-\-\_\-construct}!Stats@{Stats}}
  56. \subsubsection[{\-\_\-\-\_\-construct}]{\setlength{\rightskip}{0pt plus 5cm}\-\_\-\-\_\-construct (
  57. \begin{DoxyParamCaption}
  58. \item[{}]{\$connection, }
  59. \item[{}]{\$current\-\_\-user = {\ttfamily null}, }
  60. \item[{}]{\$table\-Name = {\ttfamily 'stats'}}
  61. \end{DoxyParamCaption}
  62. )}}\label{class_stats_a9b576568bc17458490e6985a7489c3a9}
  63. \begin{DoxyParams}[1]{Parameters}
  64. string & {\em \$connection} & \\
  65. \hline
  66. null & {\em \$current\-\_\-user} & \\
  67. \hline
  68. string & {\em \$table\-Name} & \\
  69. \hline
  70. \end{DoxyParams}
  71. Definition at line 18 of file Stats.\-class.\-php.
  72. \hypertarget{class_stats_a421831a265621325e1fdd19aace0c758}{\index{Stats@{Stats}!\-\_\-\-\_\-destruct@{\-\_\-\-\_\-destruct}}
  73. \index{\-\_\-\-\_\-destruct@{\-\_\-\-\_\-destruct}!Stats@{Stats}}
  74. \subsubsection[{\-\_\-\-\_\-destruct}]{\setlength{\rightskip}{0pt plus 5cm}\-\_\-\-\_\-destruct (
  75. \begin{DoxyParamCaption}
  76. {}
  77. \end{DoxyParamCaption}
  78. )}}\label{class_stats_a421831a265621325e1fdd19aace0c758}
  79. Destructor. Unsets all object variables
  80. Definition at line 29 of file Stats.\-class.\-php.
  81. \subsection{Member Function Documentation}
  82. \hypertarget{class_stats_adf94df76cef17a9a175924473b71446e}{\index{Stats@{Stats}!count\-Dates@{count\-Dates}}
  83. \index{count\-Dates@{count\-Dates}!Stats@{Stats}}
  84. \subsubsection[{count\-Dates}]{\setlength{\rightskip}{0pt plus 5cm}count\-Dates (
  85. \begin{DoxyParamCaption}
  86. \item[{}]{\$start, }
  87. \item[{}]{\$end}
  88. \end{DoxyParamCaption}
  89. )}}\label{class_stats_adf94df76cef17a9a175924473b71446e}
  90. counts the number of days between to dates
  91. \begin{DoxyParams}[1]{Parameters}
  92. string & {\em \$start} & start date \\
  93. \hline
  94. string & {\em \$end} & end date\\
  95. \hline
  96. \end{DoxyParams}
  97. \begin{DoxyReturn}{Returns}
  98. int
  99. \end{DoxyReturn}
  100. Definition at line 288 of file Stats.\-class.\-php.
  101. \hypertarget{class_stats_a025ccf47b1021dba92cb33c15b36e63b}{\index{Stats@{Stats}!get\-First\-Date@{get\-First\-Date}}
  102. \index{get\-First\-Date@{get\-First\-Date}!Stats@{Stats}}
  103. \subsubsection[{get\-First\-Date}]{\setlength{\rightskip}{0pt plus 5cm}get\-First\-Date (
  104. \begin{DoxyParamCaption}
  105. {}
  106. \end{DoxyParamCaption}
  107. )}}\label{class_stats_a025ccf47b1021dba92cb33c15b36e63b}
  108. gets the first date logged in the stats
  109. \begin{DoxyReturn}{Returns}
  110. string
  111. \end{DoxyReturn}
  112. Definition at line 315 of file Stats.\-class.\-php.
  113. \hypertarget{class_stats_a4de981ae1f7c64de95d1d98f001b3e5f}{\index{Stats@{Stats}!get\-Last\-Date@{get\-Last\-Date}}
  114. \index{get\-Last\-Date@{get\-Last\-Date}!Stats@{Stats}}
  115. \subsubsection[{get\-Last\-Date}]{\setlength{\rightskip}{0pt plus 5cm}get\-Last\-Date (
  116. \begin{DoxyParamCaption}
  117. {}
  118. \end{DoxyParamCaption}
  119. )}}\label{class_stats_a4de981ae1f7c64de95d1d98f001b3e5f}
  120. gets the last date logged in the stats
  121. \begin{DoxyReturn}{Returns}
  122. string
  123. \end{DoxyReturn}
  124. Definition at line 333 of file Stats.\-class.\-php.
  125. \hypertarget{class_stats_af0592a90f0b14c809dad12c026a18b68}{\index{Stats@{Stats}!get\-Raw\-Stats@{get\-Raw\-Stats}}
  126. \index{get\-Raw\-Stats@{get\-Raw\-Stats}!Stats@{Stats}}
  127. \subsubsection[{get\-Raw\-Stats}]{\setlength{\rightskip}{0pt plus 5cm}get\-Raw\-Stats (
  128. \begin{DoxyParamCaption}
  129. \item[{}]{\$start = {\ttfamily null}, }
  130. \item[{}]{\$end = {\ttfamily null}, }
  131. \item[{}]{\$fields = {\ttfamily '$\ast$'}}
  132. \end{DoxyParamCaption}
  133. )}}\label{class_stats_af0592a90f0b14c809dad12c026a18b68}
  134. gets complete raw stats for the range identified C\-A\-U\-T\-I\-O\-N!!! Keeping \$start and \$end as N\-U\-L\-L will result in far too much data in most instances
  135. \begin{DoxyParams}[1]{Parameters}
  136. string & {\em \$start} & start date \\
  137. \hline
  138. string & {\em \$end} & end date \\
  139. \hline
  140. string & {\em \$fields} & \\
  141. \hline
  142. \end{DoxyParams}
  143. \begin{DoxyReturn}{Returns}
  144. array
  145. \end{DoxyReturn}
  146. Definition at line 356 of file Stats.\-class.\-php.
  147. \hypertarget{class_stats_ab8b13de24fa5d9e50a0d7cf9e9f1af32}{\index{Stats@{Stats}!get\-Total\-Distinct\-I\-Ps@{get\-Total\-Distinct\-I\-Ps}}
  148. \index{get\-Total\-Distinct\-I\-Ps@{get\-Total\-Distinct\-I\-Ps}!Stats@{Stats}}
  149. \subsubsection[{get\-Total\-Distinct\-I\-Ps}]{\setlength{\rightskip}{0pt plus 5cm}get\-Total\-Distinct\-I\-Ps (
  150. \begin{DoxyParamCaption}
  151. \item[{}]{\$start = {\ttfamily null}, }
  152. \item[{}]{\$end = {\ttfamily null}}
  153. \end{DoxyParamCaption}
  154. )}}\label{class_stats_ab8b13de24fa5d9e50a0d7cf9e9f1af32}
  155. gets the total number of distinct I\-P addresses (optionally\-: within a specified range)
  156. \begin{DoxyParams}[1]{Parameters}
  157. string & {\em \$start} & start date \\
  158. \hline
  159. string & {\em \$end} & end date\\
  160. \hline
  161. \end{DoxyParams}
  162. \begin{DoxyReturn}{Returns}
  163. int
  164. \end{DoxyReturn}
  165. Definition at line 161 of file Stats.\-class.\-php.
  166. \hypertarget{class_stats_aaf9ae81485efae3ce6f902ddac969a45}{\index{Stats@{Stats}!get\-Total\-Distinct\-Pages@{get\-Total\-Distinct\-Pages}}
  167. \index{get\-Total\-Distinct\-Pages@{get\-Total\-Distinct\-Pages}!Stats@{Stats}}
  168. \subsubsection[{get\-Total\-Distinct\-Pages}]{\setlength{\rightskip}{0pt plus 5cm}get\-Total\-Distinct\-Pages (
  169. \begin{DoxyParamCaption}
  170. \item[{}]{\$start = {\ttfamily null}, }
  171. \item[{}]{\$end = {\ttfamily null}}
  172. \end{DoxyParamCaption}
  173. )}}\label{class_stats_aaf9ae81485efae3ce6f902ddac969a45}
  174. gets the total number of distinct pages (optionally\-: within a specified range) The 'page' column is derived from \$\-\_\-\-S\-E\-R\-V\-E\-R\mbox{[}'P\-H\-P\-\_\-\-S\-E\-L\-F'\mbox{]} which means it only gets the actual page that was viewed, without the query string variables
  175. \begin{DoxyParams}[1]{Parameters}
  176. string & {\em \$start} & start date \\
  177. \hline
  178. string & {\em \$end} & end date\\
  179. \hline
  180. \end{DoxyParams}
  181. \begin{DoxyReturn}{Returns}
  182. int
  183. \end{DoxyReturn}
  184. Definition at line 238 of file Stats.\-class.\-php.
  185. \hypertarget{class_stats_aa186bab67dcb150d445b84e6ec52cfd9}{\index{Stats@{Stats}!get\-Total\-Distinct\-Sessions@{get\-Total\-Distinct\-Sessions}}
  186. \index{get\-Total\-Distinct\-Sessions@{get\-Total\-Distinct\-Sessions}!Stats@{Stats}}
  187. \subsubsection[{get\-Total\-Distinct\-Sessions}]{\setlength{\rightskip}{0pt plus 5cm}get\-Total\-Distinct\-Sessions (
  188. \begin{DoxyParamCaption}
  189. \item[{}]{\$start = {\ttfamily null}, }
  190. \item[{}]{\$end = {\ttfamily null}}
  191. \end{DoxyParamCaption}
  192. )}}\label{class_stats_aa186bab67dcb150d445b84e6ec52cfd9}
  193. gets the total number of distinct sessions (optionally\-: within a specified range)
  194. \begin{DoxyParams}[1]{Parameters}
  195. string & {\em \$start} & start date \\
  196. \hline
  197. string & {\em \$end} & end date\\
  198. \hline
  199. \end{DoxyParams}
  200. \begin{DoxyReturn}{Returns}
  201. int
  202. \end{DoxyReturn}
  203. Definition at line 136 of file Stats.\-class.\-php.
  204. \hypertarget{class_stats_a0c99010e511c7fc19ad59f16179524cb}{\index{Stats@{Stats}!get\-Total\-Distinct\-U\-R\-Is@{get\-Total\-Distinct\-U\-R\-Is}}
  205. \index{get\-Total\-Distinct\-U\-R\-Is@{get\-Total\-Distinct\-U\-R\-Is}!Stats@{Stats}}
  206. \subsubsection[{get\-Total\-Distinct\-U\-R\-Is}]{\setlength{\rightskip}{0pt plus 5cm}get\-Total\-Distinct\-U\-R\-Is (
  207. \begin{DoxyParamCaption}
  208. \item[{}]{\$start = {\ttfamily null}, }
  209. \item[{}]{\$end = {\ttfamily null}}
  210. \end{DoxyParamCaption}
  211. )}}\label{class_stats_a0c99010e511c7fc19ad59f16179524cb}
  212. gets the total number of distinct U\-R\-Is (optionally\-: within a specified range)
  213. \begin{DoxyParams}[1]{Parameters}
  214. string & {\em \$start} & start date \\
  215. \hline
  216. string & {\em \$end} & end date\\
  217. \hline
  218. \end{DoxyParams}
  219. \begin{DoxyReturn}{Returns}
  220. int
  221. \end{DoxyReturn}
  222. Definition at line 186 of file Stats.\-class.\-php.
  223. \hypertarget{class_stats_a85991d88c2f5401b051cc554b04bdec8}{\index{Stats@{Stats}!get\-Total\-Distinct\-User\-Agents@{get\-Total\-Distinct\-User\-Agents}}
  224. \index{get\-Total\-Distinct\-User\-Agents@{get\-Total\-Distinct\-User\-Agents}!Stats@{Stats}}
  225. \subsubsection[{get\-Total\-Distinct\-User\-Agents}]{\setlength{\rightskip}{0pt plus 5cm}get\-Total\-Distinct\-User\-Agents (
  226. \begin{DoxyParamCaption}
  227. \item[{}]{\$start = {\ttfamily null}, }
  228. \item[{}]{\$end = {\ttfamily null}}
  229. \end{DoxyParamCaption}
  230. )}}\label{class_stats_a85991d88c2f5401b051cc554b04bdec8}
  231. gets the total number of distinct user agents (optionally\-: within a specified range)
  232. \begin{DoxyParams}[1]{Parameters}
  233. string & {\em \$start} & start date \\
  234. \hline
  235. string & {\em \$end} & end date\\
  236. \hline
  237. \end{DoxyParams}
  238. \begin{DoxyReturn}{Returns}
  239. int
  240. \end{DoxyReturn}
  241. Definition at line 211 of file Stats.\-class.\-php.
  242. \hypertarget{class_stats_a6c944fec89049927b811bd786a934e96}{\index{Stats@{Stats}!get\-Total\-Distinct\-Users@{get\-Total\-Distinct\-Users}}
  243. \index{get\-Total\-Distinct\-Users@{get\-Total\-Distinct\-Users}!Stats@{Stats}}
  244. \subsubsection[{get\-Total\-Distinct\-Users}]{\setlength{\rightskip}{0pt plus 5cm}get\-Total\-Distinct\-Users (
  245. \begin{DoxyParamCaption}
  246. \item[{}]{\$start = {\ttfamily null}, }
  247. \item[{}]{\$end = {\ttfamily null}}
  248. \end{DoxyParamCaption}
  249. )}}\label{class_stats_a6c944fec89049927b811bd786a934e96}
  250. gets the total number of distinct users (optionally\-: within a specified range)
  251. \begin{DoxyParams}[1]{Parameters}
  252. string & {\em \$start} & start date \\
  253. \hline
  254. string & {\em \$end} & end date\\
  255. \hline
  256. \end{DoxyParams}
  257. \begin{DoxyReturn}{Returns}
  258. int
  259. \end{DoxyReturn}
  260. Definition at line 263 of file Stats.\-class.\-php.
  261. \hypertarget{class_stats_a017d22295900a75171f1a3e5b488eb09}{\index{Stats@{Stats}!get\-Total\-Page\-Views@{get\-Total\-Page\-Views}}
  262. \index{get\-Total\-Page\-Views@{get\-Total\-Page\-Views}!Stats@{Stats}}
  263. \subsubsection[{get\-Total\-Page\-Views}]{\setlength{\rightskip}{0pt plus 5cm}get\-Total\-Page\-Views (
  264. \begin{DoxyParamCaption}
  265. \item[{}]{\$start = {\ttfamily null}, }
  266. \item[{}]{\$end = {\ttfamily null}}
  267. \end{DoxyParamCaption}
  268. )}}\label{class_stats_a017d22295900a75171f1a3e5b488eb09}
  269. gets the total number of page views (optionally\-: within a specified range)
  270. \begin{DoxyParams}[1]{Parameters}
  271. string & {\em \$start} & start date \\
  272. \hline
  273. string & {\em \$end} & end date\\
  274. \hline
  275. \end{DoxyParams}
  276. \begin{DoxyReturn}{Returns}
  277. int
  278. \end{DoxyReturn}
  279. Definition at line 111 of file Stats.\-class.\-php.
  280. \hypertarget{class_stats_aec6efc1f87114d251b6d91be90bc3ddd}{\index{Stats@{Stats}!insert\-Stats@{insert\-Stats}}
  281. \index{insert\-Stats@{insert\-Stats}!Stats@{Stats}}
  282. \subsubsection[{insert\-Stats}]{\setlength{\rightskip}{0pt plus 5cm}insert\-Stats (
  283. \begin{DoxyParamCaption}
  284. {}
  285. \end{DoxyParamCaption}
  286. )}}\label{class_stats_aec6efc1f87114d251b6d91be90bc3ddd}
  287. inserts the stats into the database
  288. \begin{DoxyReturn}{Returns}
  289. bool
  290. \end{DoxyReturn}
  291. Definition at line 58 of file Stats.\-class.\-php.
  292. \hypertarget{class_stats_a604a265217a1774947350bca38b39e01}{\index{Stats@{Stats}!set\-Ignore@{set\-Ignore}}
  293. \index{set\-Ignore@{set\-Ignore}!Stats@{Stats}}
  294. \subsubsection[{set\-Ignore}]{\setlength{\rightskip}{0pt plus 5cm}set\-Ignore (
  295. \begin{DoxyParamCaption}
  296. \item[{}]{\$array}
  297. \end{DoxyParamCaption}
  298. )}}\label{class_stats_a604a265217a1774947350bca38b39e01}
  299. Sets the array of pages to be ignored (I\-O\-W not included in stats)
  300. \begin{DoxyParams}[1]{Parameters}
  301. array & {\em \$array} & \\
  302. \hline
  303. \end{DoxyParams}
  304. Definition at line 47 of file Stats.\-class.\-php.
  305. The documentation for this class was generated from the following file\-:\begin{DoxyCompactItemize}
  306. \item
  307. /\-Users/karlgroves/\-Documents/sites/gs\-\_\-libs/Stats.\-class.\-php\end{DoxyCompactItemize}