CMS
Version 3.9
email_manager_test.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
/*
40
* Datamodel to test email manager
41
*/
42
class
EmailManagerTest
extends
DataItem
43
{
44
var
$fields
= array(
45
"test_id"
=> Number,
46
"string"
=> String,
47
"email"
=> String,
48
"date"
=> Date,
49
"relation_id"
=> Number
50
);
51
52
var
$relations
= array(
53
"EmailManagerTestRelation"
=>
EmailManagerTestRelation
54
);
55
56
function
TestFunction
()
57
{
58
return
"this is the text returned from the function 'TestFunction' in the EmailManagerTest datamodel."
;
59
}
60
61
function
EmailManagerTestRelation
()
62
{
63
return
$this->getRelated(
EmailManagerTestRelation
);
64
}
65
66
function
EmailManagerTest
()
67
{
68
$this->table =
"email_manager_test"
;
69
$this->primary_key =
"test_id"
;
70
71
$this->DataItem(func_get_args());
72
73
}
74
}
75
76
77
class
EmailManagerTestRelation
extends
DataItem
78
{
79
var
$fields
= array(
80
"relation_id"
=> Number,
81
"string"
=> String
82
);
83
84
function
TestRelationFunction
()
85
{
86
return
"this is the text returned from the function 'TestRelationFunction' in the EmailManagerTestRelation datamodel."
;
87
}
88
89
function
EmailManagerTestRelation
()
90
{
91
$this->table =
"email_manager_test_relation"
;
92
$this->primary_key =
"relation_id"
;
93
94
$this->DataItem(func_get_args());
95
96
}
97
}
98
99
/*
100
* test class callback
101
*/
102
class
EmailManagerTestClass
103
{
104
function
EmailManagerTestClass
()
105
{
106
107
}
108
109
static
function
TestCallback
($emailMgrTest)
110
{
111
return
"EmailManagerTestClass::TestCallback "
. $emailMgrTest->string;
112
}
113
}
114
115
116
function
emailManagerCallbackFunction
(
$obj
)
117
{
118
return
"EmailManager: emailManagerCallbackFunction "
.
$obj
->string;
119
}?>
$obj
$obj
Definition:
data_import_select.inc:29
EmailManagerTestClass
Definition:
email_manager_test.inc:103
EmailManagerTestClass\TestCallback
static TestCallback($emailMgrTest)
Definition:
email_manager_test.inc:109
EmailManagerTestClass\EmailManagerTestClass
EmailManagerTestClass()
Definition:
email_manager_test.inc:104
EmailManagerTest
Definition:
email_manager_test.inc:43
EmailManagerTest\$relations
$relations
Definition:
email_manager_test.inc:52
EmailManagerTest\EmailManagerTest
EmailManagerTest()
Definition:
email_manager_test.inc:66
EmailManagerTest\EmailManagerTestRelation
EmailManagerTestRelation()
Definition:
email_manager_test.inc:61
EmailManagerTest\TestFunction
TestFunction()
Definition:
email_manager_test.inc:56
EmailManagerTest\$fields
$fields
Definition:
email_manager_test.inc:44
EmailManagerTestRelation
Definition:
email_manager_test.inc:78
EmailManagerTestRelation\TestRelationFunction
TestRelationFunction()
Definition:
email_manager_test.inc:84
EmailManagerTestRelation\$fields
$fields
Definition:
email_manager_test.inc:79
EmailManagerTestRelation\EmailManagerTestRelation
EmailManagerTestRelation()
Definition:
email_manager_test.inc:89
emailManagerCallbackFunction
emailManagerCallbackFunction($obj)
Definition:
email_manager_test.inc:116
code
cms.sonjara.com
cms
components
email
datamodel
email_manager_test.inc
Generated on Tue Mar 23 2021 15:36:12 for CMS by
1.9.1