-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.php
More file actions
41 lines (39 loc) · 824 Bytes
/
app.php
File metadata and controls
41 lines (39 loc) · 824 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<?php
$app = new NUObject(array(
'init'=>true,
'db'=>new NUObject(array(
'setQuery'=>function($self,$q){
$self->connect();
$self->q=$q;
},
'query'=>function($self,$affected_rows=true){
},
'getResult'=>function($self){
},
'getRow'=>function($self){
},
'getRows'=>function($self){
}
)),
'database'=>new NUObject(array(
'driver'=>null,
'host'=>null,
'username'=>null,
'password'=>null,
'dbname'=>null
)),
'helper'=>new NUObject(array(
'getObject'=>function($self,$obj){
$param=explode("\\",$obj);
$strobj = implode("->",$param);
return $self::$base->$strobj;
}
)),
'run'=>function($self){
include("database/mysql.php");
$db=$self::$base->database;
$driver = $db->driver;
$self::$base->db = $db->$driver;
}
));
?>