CMS
Version 3.9
video_download.inc
Go to the documentation of this file.
1
<?php
7
/**************************************************************
8
9
Copyright (c) 2010 Sonjara, Inc
10
11
Permission is hereby granted, free of charge, to any person
12
obtaining a copy of this software and associated documentation
13
files (the "Software"), to deal in the Software without
14
restriction, including without limitation the rights to use,
15
copy, modify, merge, publish, distribute, sublicense, and/or sell
16
copies of the Software, and to permit persons to whom the
17
Software is furnished to do so, subject to the following
18
conditions:
19
20
The above copyright notice and this permission notice shall be
21
included in all copies or substantial portions of the Software.
22
23
Except as contained in this notice, the name(s) of the above
24
copyright holders shall not be used in advertising or otherwise
25
to promote the sale, use or other dealings in this Software
26
without prior written authorization.
27
28
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
29
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
30
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
31
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
32
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
33
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
34
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
35
OTHER DEALINGS IN THE SOFTWARE.
36
37
*****************************************************************/
38
39
class
VideoDownload
extends
DataItem
40
{
41
var
$fields
= array(
"download_id"
=> Number,
42
"video_id"
=> Number,
43
"download_date"
=> Timestamp,
44
"user_id"
=> Number);
45
46
47
// Relations
48
49
var
$relations
= array(
"Video"
=>
Video
,
50
"User"
=>
""
);
51
52
53
function
Video
()
54
{
55
return
$this->getRelated(
Video
);
56
}
57
58
function
User
()
59
{
60
if
(!$this->
user_id
)
return
null
;
61
$mgr
=
new
UserManager
();
62
return
$mgr
->getUser($this->
user_id
);
63
}
64
65
function
VideoDownload
()
66
{
67
$this->primary_key =
"download_id"
;
68
$this->table =
"video_download"
;
69
70
$this->DataItem(func_get_args());
71
}
72
}
73
74
// view
75
class
VideoDownloadDailyStats
extends
DataItem
76
{
77
// Fields
78
79
var
$fields
= array(
"video_id"
=> Number,
80
"video_gallery_id"
=> Number,
81
"download_date"
=> Date,
82
"download_count"
=> Number);
83
84
// Relations
85
86
var
$relations
= array(
"VideoGallery"
=>
VideoGallery
,
87
"Video"
=>
Video
,
88
);
89
90
function
Video
()
91
{
92
return
$this->getRelated(
Video
);
93
}
94
95
function
VideoGallery
()
96
{
97
return
$this->getRelated(
VideoGallery
);
98
}
99
100
function
VideoDownloadDailyStats
()
101
{
102
$this->table =
"video_download_daily_stats"
;
103
104
$this->DataItem(func_get_args());
105
}
106
}
107
108
// view
109
class
VideoDownloadTotalStats
extends
DataItem
110
{
111
// Fields
112
113
var
$fields
= array(
"video_id"
=> Number,
114
"video_gallery_id"
=> Number,
115
"download_count"
=> Number);
116
117
// Relations
118
119
var
$relations
= array(
"VideoGallery"
=>
VideoGallery
);
120
121
function
VideoGallery
()
122
{
123
return
$this->getRelated(
VideoGallery
);
124
}
125
126
function
VideoDownloadTotalStats
()
127
{
128
$this->table =
"video_download_total_stats"
;
129
130
$this->DataItem(func_get_args());
131
}
132
}
133
?>
$mgr
$mgr
Definition:
authentication_token_form.inc:55
UserManager
Provides the interface to the user model for the application.
Definition:
user_manager.inc:50
VideoDownloadDailyStats
Definition:
video_download.inc:76
VideoDownloadDailyStats\VideoDownloadDailyStats
VideoDownloadDailyStats()
Definition:
video_download.inc:100
VideoDownloadDailyStats\VideoGallery
VideoGallery()
Definition:
video_download.inc:95
VideoDownloadDailyStats\Video
Video()
Definition:
video_download.inc:90
VideoDownloadDailyStats\$relations
$relations
Definition:
video_download.inc:86
VideoDownloadDailyStats\$fields
$fields
Definition:
video_download.inc:79
VideoDownload
Definition:
video_download.inc:40
VideoDownload\$fields
$fields
Definition:
video_download.inc:41
VideoDownload\User
User()
Definition:
video_download.inc:58
VideoDownload\Video
Video()
Definition:
video_download.inc:53
VideoDownload\VideoDownload
VideoDownload()
Definition:
video_download.inc:65
VideoDownload\$relations
$relations
Definition:
video_download.inc:49
VideoDownloadTotalStats
Definition:
video_download.inc:110
VideoDownloadTotalStats\VideoGallery
VideoGallery()
Definition:
video_download.inc:121
VideoDownloadTotalStats\VideoDownloadTotalStats
VideoDownloadTotalStats()
Definition:
video_download.inc:126
VideoDownloadTotalStats\$fields
$fields
Definition:
video_download.inc:113
VideoDownloadTotalStats\$relations
$relations
Definition:
video_download.inc:119
VideoGallery
Definition:
video_gallery.inc:40
Video
Definition:
video.inc:42
user_id
$feedback user_id
Definition:
save.inc:14
code
cms.sonjara.com
cms
components
video
datamodel
video_download.inc
Generated on Tue Mar 23 2021 15:36:15 for CMS by
1.9.1