XOOPS
2.6.0
Main Page
Related Pages
Classes
Files
Examples
File List
File Members
smiley.php
Go to the documentation of this file.
1
<?php
2
/*
3
You may not change or alter any portion of this comment or credits
4
of supporting developers from this source code or any supporting source code
5
which is considered copyrighted (c) material of the original comment or credit authors.
6
7
This program is distributed in the hope that it will be useful,
8
but WITHOUT ANY WARRANTY; without even the implied warranty of
9
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
10
*/
11
12
use
Xoops\Core\Database\Connection
;
13
use
Xoops\Core\Kernel\Criteria
;
14
use
Xoops\Core\Kernel\CriteriaCompo
;
15
use
Xoops\Core\Kernel\XoopsObject
;
16
use
Xoops\Core\Kernel\XoopsPersistableObjectHandler
;
17
25
class
SmiliesSmiley
extends
XoopsObject
26
{
30
public
function
__construct
()
31
{
32
$this->
initVar
(
'smiley_id'
,
XOBJ_DTYPE_INT
, null,
false
);
33
$this->
initVar
(
'smiley_code'
,
XOBJ_DTYPE_TXTBOX
, null,
true
, 100);
34
$this->
initVar
(
'smiley_url'
,
XOBJ_DTYPE_OTHER
, null,
false
, 30);
35
$this->
initVar
(
'smiley_emotion'
,
XOBJ_DTYPE_TXTBOX
, null,
true
, 100);
36
$this->
initVar
(
'smiley_display'
,
XOBJ_DTYPE_INT
, 1,
false
);
37
}
38
}
39
40
class
SmiliesSmileyHandler
extends
XoopsPersistableObjectHandler
41
{
47
public
function
__construct
(
Connection
$db = null)
48
{
49
parent::__construct($db,
'smilies'
,
'SmiliesSmiley'
,
'smiley_id'
,
'smiley_emotion'
);
50
}
51
52
public
function
getSmilies
(
$start
=0,
$limit
=0, $asobject=
true
)
53
{
54
$criteria
=
new
CriteriaCompo
();
55
$criteria
->setSort(
'smiley_id'
);
56
$criteria
->setOrder(
'ASC'
);
57
$criteria
->setStart(
$start
);
58
$criteria
->setLimit(
$limit
);
59
return
parent::getall(
$criteria
,
false
, $asobject);
60
}
61
62
public
function
getActiveSmilies
($asobject=
true
)
63
{
64
$criteria
=
new
CriteriaCompo
(
new
Criteria
(
'smiley_display'
, 1));
65
return
parent::getall(
$criteria
,
false
, $asobject);
66
}
67
}
SmiliesSmileyHandler\__construct
__construct(Connection $db=null)
Definition:
smiley.php:47
SmiliesSmileyHandler\getActiveSmilies
getActiveSmilies($asobject=true)
Definition:
smiley.php:62
SmiliesSmiley\__construct
__construct()
Definition:
smiley.php:30
Xoops\Core\Kernel\CriteriaCompo
Definition:
CriteriaCompo.php:30
CriteriaCompo
Xoops\Core\Kernel\XoopsPersistableObjectHandler
Definition:
XoopsPersistableObjectHandler.php:30
Xoops\Core\Kernel\Criteria
Definition:
Criteria.php:30
XoopsObject
Xoops\Core\Kernel\XOBJ_DTYPE_INT
const XOBJ_DTYPE_INT
Definition:
XoopsObject.php:22
Connection
Xoops\Core\Kernel\XOBJ_DTYPE_TXTBOX
const XOBJ_DTYPE_TXTBOX
Definition:
XoopsObject.php:20
Connection
XoopsPersistableObjectHandler
SmiliesSmileyHandler\getSmilies
getSmilies($start=0, $limit=0, $asobject=true)
Definition:
smiley.php:52
SmiliesSmileyHandler
Definition:
smiley.php:40
Criteria
Xoops\Core\Kernel\XoopsObject
Definition:
XoopsObject.php:47
$limit
$limit
Definition:
findusers.php:202
$criteria
$criteria
Definition:
page_configsite.php:52
$start
$start
Definition:
xoops_images.php:33
Xoops\Core\Kernel\XoopsObject\initVar
initVar($key, $data_type, $value=null, $required=false, $maxlength=null, $options= '')
Definition:
XoopsObject.php:172
Xoops\Core\Kernel\XOBJ_DTYPE_OTHER
const XOBJ_DTYPE_OTHER
Definition:
XoopsObject.php:26
SmiliesSmiley
Definition:
smiley.php:25
usr64
htdocs
modules
smilies
class
smiley.php
Generated on Fri May 22 2015 03:07:04 for XOOPS by
1.8.9.1