XOOPS  2.6.0
object.php
Go to the documentation of this file.
1 <?php
12 
17 {
18 }
19 
24 {
28  public $db;
29 
35  public function __construct(Connection $db)
36  {
37  $this->db = XoopsDatabaseFactory::getDatabaseConnection(); // get legacy connection
38  parent::__construct($db);
39  }
40 }
41 
46 {
50  public $db;
51 
57  protected function __construct(
58  Connection $db = null,
59  $table = '',
60  $className = '',
61  $keyName = '',
62  $identifierName = ''
63  ) {
64  if ($db===null) {
65  $this->db2 = \Xoops\Core\Database\Factory::getConnection();
66  $db = $this->db2;
67  }
68  $this->db = XoopsDatabaseFactory::getDatabaseConnection(); // get legacy connection
69  parent::__construct($db, $table, $className, $keyName, $identifierName);
70  }
71 }
__construct(Connection $db)
Definition: object.php:35
__construct(Connection $db=null, $table= '', $className= '', $keyName= '', $identifierName= '')
Definition: object.php:57