function Model($id = 0) { $class = get_class($this); if ($class::$useTable != FALSE) { if (self::$conexao == NULL) { self::$conexao = new Connexao(); } //$this->id = self::lastID(); $this->id = $id; } }
public static function init() { if (self::$conexao == NULL) { self::$conexao = new Connexao(); } }