bookmark::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 10

Duplication

Lines 10
Ratio 100 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 0
dl 10
loc 10
rs 9.9332
c 0
b 0
f 0
1
<?php
2
//
3
// ------------------------------------------------------------------------ //
4
// This program is free software; you can redistribute it and/or modify     //
5
// it under the terms of the GNU General Public License as published by     //
6
// the Free Software Foundation; either version 2 of the License, or        //
7
// (at your option) any later version.                                      //
8
//                                                                          //
9
// You may not change or alter any portion of this comment or credits       //
10
// of supporting developers from this source code or any supporting         //
11
// source code which is considered copyrighted (c) material of the          //
12
// original comment or credit authors.                                      //
13
//                                                                          //
14
// This program is distributed in the hope that it will be useful,          //
15
// but WITHOUT ANY WARRANTY; without even the implied warranty of           //
16
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the            //
17
// GNU General Public License for more details.                             //
18
//                                                                          //
19
// You should have received a copy of the GNU General Public License        //
20
// along with this program; if not, write to the Free Software              //
21
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA //
22
// ------------------------------------------------------------------------ //
23
// Author: phppp (D.J., [email protected])                                  //
24
// URL: https://xoops.org                         //
25
// Project: Article Project                                                 //
26
// ------------------------------------------------------------------------ //
27
/**
28
 * @package   module::blogline
29
 * @copyright copyright &copy; 2005 XoopsForge.com
30
 */
31
32
// defined('XOOPS_ROOT_PATH') || die('Restricted access');
33
require_once __DIR__ . '/../include/vars.php';
34
//mod_loadFunctions('', $GLOBALS['moddirname']);
35
36
/**
37
 * Bookmark
38
 *
39
 * @author    D.J. (phppp)
40
 * @copyright copyright &copy; 2005 XoopsForge.com
41
 * @package   module::article
42
 *
43
 * {@link XoopsObject}
44
 **/
45 View Code Duplication
if (!class_exists('Bookmark')):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated across your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
46
47
    /**
48
     * Class Bookmark
49
     */
50
    class bookmark extends XoopsObject
51
    {
52
        /**
53
         * Constructor
54
         */
55
        public function __construct()
56
        {
57
            //            $this->ArtObject();
58
            $this->table = planet_DB_prefix('bookmark');
59
            $this->initVar('bm_id', XOBJ_DTYPE_INT, null, false);
60
            /* user ID */
61
            $this->initVar('bm_uid', XOBJ_DTYPE_INT, 0, true);
62
            /* blog ID */
63
            $this->initVar('blog_id', XOBJ_DTYPE_INT, 0, true);
64
        }
65
    }
66
endif;
67
/**
68
 * Topic object handler class.
69
 * @package   module::article
70
 *
71
 * @author    D.J. (phppp)
72
 * @copyright copyright &copy; 2005 XOOPS Project
73
 *
74
 * {@link XoopsPersistableObjectHandler}
75
 *
76
 * @param CLASS_PREFIX variable prefix for the class name
77
 */
78
79
PlanetUtility::planetParseClass('
80
class [CLASS_PREFIX]BookmarkHandler extends XoopsPersistableObjectHandler
81
{
82
    /**
83
     * Constructor
84
     *
85
     * @param object $db reference to the {@link XoopsDatabase} object
86
     **/
87
    public function __construct(\XoopsDatabase $db) {
88
        parent::__construct($db, planet_DB_prefix("bookmark", true), "Bookmark", "bm_id");
89
    }
90
}
91
');
92