dbObject::__construct PHP Méthode

__construct() public méthode

public __construct ( array $data = null )
$data array Data to preload on object creation
    public function __construct($data = null)
    {
        $this->db = MysqliDb::getInstance();
        if (empty($this->dbTable)) {
            $this->dbTable = get_class($this);
        }
        if ($data) {
            $this->data = $data;
        }
    }

Usage Example

Exemple #1
0
 /**
  * Run default constructor and define table name
  */
 function __construct()
 {
     parent::__construct();
     $this->table = 'list';
 }
All Usage Examples Of dbObject::__construct