Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#1244 XoopsObjectHandler class kernel object.php

XOOPS_2.6.x
open
trabis
None
1
2013-01-15
2013-01-01
Alain91
No

Is there any reasons for not using the $db argument if it is not null ?

it seems that we always override the value with calling XoopsDatabasefactory...

# class XoopsPersistableObjectHandler extends XoopsObjectHandler
# {
#    public function __construct(XoopsDatabase $db = null, $table = '', $className = '', $keyName = '', $identifierName = '')
# {
#    $db = XoopsDatabaseFactory::getDatabaseConnection();
#    $table = $db->prefix($table);
#    parent::__construct($db);
#    $this->table = $table;
#    $this->keyName = $keyName;
#    $this->className = $className;
#    if ($identifierName) {
#        $this->identifierName = $identifierName;
#    }
# }

Discussion

  • Michael Beck
    Michael Beck
    2013-01-15

    • assigned_to: trabis